[cmake-commits] alex committed cmCPackDebGenerator.cxx 1.10 1.11

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Aug 15 08:28:11 EDT 2007


Update of /cvsroot/CMake/CMake/Source/CPack
In directory public:/mounts/ram/cvs-serv16143

Modified Files:
	cmCPackDebGenerator.cxx 
Log Message:

COMP: fix build on HPUX, snprintf apparently doesn't work there

Alex


Index: cmCPackDebGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- cmCPackDebGenerator.cxx	14 Aug 2007 14:25:23 -0000	1.10
+++ cmCPackDebGenerator.cxx	15 Aug 2007 12:28:08 -0000	1.11
@@ -369,15 +369,14 @@
     gid = USHRT_MAX;
     }
   if (lname > sizeof(hdr->ar_name) || strchr(name, ' '))
-    (void)snprintf(ar_hb, sizeof(ar_hb),
-      HDR1, AR_EFMT1, lname,
-      (long int)sb->st_mtime, uid, gid, sb->st_mode,
-      sb->st_size + lname, ARFMAG);
+    (void)sprintf(ar_hb, HDR1, AR_EFMT1, lname,
+                  (long int)sb->st_mtime, uid, gid, sb->st_mode,
+                  (long long)sb->st_size + lname, ARFMAG);
     else {
       lname = 0;
-      (void)snprintf(ar_hb, sizeof(ar_hb),
-        HDR2, name, (long int)sb->st_mtime,
-                    uid, gid, sb->st_mode, sb->st_size, ARFMAG);
+      (void)sprintf(ar_hb, HDR2, name, 
+                    (long int)sb->st_mtime, uid, gid, sb->st_mode, 
+                    (long long)sb->st_size, ARFMAG);
       }
     off_t size = sb->st_size;
 



More information about the Cmake-commits mailing list