[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/uucp/devel uucp-1.07-lfs.patch,1.1,1.2 uucp.spec,1.24,1.25



Author: pvrabec

Update of /cvs/dist/rpms/uucp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv26373

Modified Files:
	uucp-1.07-lfs.patch uucp.spec 
Log Message:
- revert fix from 1.07-9
- fix truncation of values on 32b platforms where statvfs64
  is being called on a large file system (#153259)


uucp-1.07-lfs.patch:
 fsusg.c |    8 ++++----
 fsusg.h |   16 +++++++++++-----
 2 files changed, 15 insertions(+), 9 deletions(-)

Index: uucp-1.07-lfs.patch
===================================================================
RCS file: /cvs/dist/rpms/uucp/devel/uucp-1.07-lfs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- uucp-1.07-lfs.patch	19 Apr 2005 14:44:52 -0000	1.1
+++ uucp-1.07-lfs.patch	14 Jul 2005 13:58:39 -0000	1.2
@@ -1,132 +1,50 @@
---- uucp-1.07/system.h.lfs	2003-05-29 08:08:46.000000000 +0200
-+++ uucp-1.07/system.h	2005-04-19 16:38:05.928283364 +0200
-@@ -837,7 +837,7 @@
- /* Return the amount of free space on the containing the given file
-    name (the file may or may not exist).  If the amount of free space
-    cannot be determined, the function should return -1.  */
--extern long csysdep_bytes_free P((const char *zfile));
-+extern long long csysdep_bytes_free P((const char *zfile));
- 
- /* Start getting status information for all systems with available
-    status information.  There may be status information for unknown
---- uucp-1.07/uuxqt.c.lfs	2003-05-29 08:08:48.000000000 +0200
-+++ uucp-1.07/uuxqt.c	2005-04-19 16:38:05.929283220 +0200
-@@ -1576,7 +1576,7 @@
-      const char *zfile;
-      int iclean;
- {
--  long cspace;
-+  long long cspace;
-   char *zsavecmd;
-   char **pzsave;
-   int c;
---- uucp-1.07/unix/bytfre.c.lfs	2003-05-29 08:08:48.000000000 +0200
-+++ uucp-1.07/unix/bytfre.c	2005-04-19 16:39:08.824241139 +0200
-@@ -9,11 +9,13 @@
- 
- #if HAVE_LIMITS_H
- #include <limits.h>
--#else
--#define LONG_MAX 2147483647
- #endif
- 
--long
-+#ifndef LLONG_MAX
-+#define LLONG_MAX 9223372036854775807LL
+--- uucp-1.07/unix/fsusg.h.lfs	2003-05-29 08:08:49.000000000 +0200
++++ uucp-1.07/unix/fsusg.h	2005-07-14 15:18:50.000000000 +0200
+@@ -19,13 +19,19 @@
+    Taylor UUCP.  */
+ 
+ /* Space usage statistics for a filesystem.  Blocks are 512-byte. */
++
++#if ! HAVE_SYS_STATVFS_H  /* not SVR4. */
++typedef long fsblkcnt_t;
++typedef long fsfilcnt_t;
 +#endif
 +
-+long long
- csysdep_bytes_free (zfile)
-      const char *zfile;
+ struct fs_usage
  {
-@@ -21,7 +23,7 @@
- 
-   if (get_fs_usage ((char *) zfile, (char *) NULL, &s) < 0)
-     return -1;
--  if (s.fsu_bavail >= LONG_MAX / (long) 512)
--    return LONG_MAX;
--  return s.fsu_bavail * (long) 512;
-+  if (s.fsu_bavail >= LLONG_MAX / 512LL)
-+    return LLONG_MAX;
-+  return s.fsu_bavail * 512LL;
- }
---- uucp-1.07/unix/fsusg.h.lfs	2003-05-29 08:08:49.000000000 +0200
-+++ uucp-1.07/unix/fsusg.h	2005-04-19 16:38:05.930283076 +0200
-@@ -23,7 +23,7 @@
- {
-   long fsu_blocks;		/* Total blocks. */
-   long fsu_bfree;		/* Free blocks available to superuser. */
+-  long fsu_blocks;		/* Total blocks. */
+-  long fsu_bfree;		/* Free blocks available to superuser. */
 -  long fsu_bavail;		/* Free blocks available to non-superuser. */
-+  long long fsu_bavail;		/* Free blocks available to non-superuser. */
-   long fsu_files;		/* Total file nodes. */
-   long fsu_ffree;		/* Free file nodes. */
+-  long fsu_files;		/* Total file nodes. */
+-  long fsu_ffree;		/* Free file nodes. */
++  fsblkcnt_t fsu_blocks;	/* Total blocks. */
++  fsblkcnt_t fsu_bfree;		/* Free blocks available to superuser. */
++  fsblkcnt_t fsu_bavail;	/* Free blocks available to non-superuser. */
++  fsfilcnt_t fsu_files;		/* Total file nodes. */
++  fsfilcnt_t fsu_ffree;		/* Free file nodes. */
  };
+ 
+ extern int get_fs_usage P((char *path, char *disk, struct fs_usage *fsp));
 --- uucp-1.07/unix/fsusg.c.lfs	2003-05-29 08:08:49.000000000 +0200
-+++ uucp-1.07/unix/fsusg.c	2005-04-19 16:38:05.931282933 +0200
-@@ -90,7 +90,7 @@
++++ uucp-1.07/unix/fsusg.c	2005-07-14 15:02:27.000000000 +0200
+@@ -90,16 +90,16 @@
  
  #if ! STAT_NONE
  
 -static long adjust_blocks P((long blocks, int fromsize, int tosize));
-+static long adjust_blocks P((long long blocks, unsigned long int fromsize, unsigned long int tosize));
++static fsblkcnt_t adjust_blocks P((fsblkcnt_t blocks, unsigned long fromsize, unsigned long tosize));
  
  /* Return the number of TOSIZE-byte blocks used by
     BLOCKS FROMSIZE-byte blocks, rounding away from zero.
-@@ -98,8 +98,8 @@
+    TOSIZE must be positive.  Return -1 if FROMSIZE is not positive.  */
  
- static long
+-static long
++static fsblkcnt_t
  adjust_blocks (blocks, fromsize, tosize)
 -     long blocks;
 -     int fromsize, tosize;
-+     long long blocks;
-+     unsigned long int fromsize, tosize;
++     fsblkcnt_t blocks;
++     unsigned long fromsize, tosize;
  {
    if (tosize <= 0)
      abort ();
---- uucp-1.07/rec.c.lfs	2003-05-29 08:08:46.000000000 +0200
-+++ uucp-1.07/rec.c	2005-04-19 16:38:05.932282789 +0200
-@@ -302,7 +302,7 @@
-      struct sdaemon *qdaemon;
- {
-   struct srecinfo *qinfo = (struct srecinfo *) qtrans->pinfo;
--  long cbytes, cbytes2;
-+  long long cbytes, cbytes2;
-   boolean fquote;
-   const struct scmd *qcmd;
-   struct scmd squoted;
-@@ -370,7 +370,7 @@
- 	     qcmd->zuser, qcmd->zoptions);
-   else if ((qdaemon->ifeatures & FEATURE_V103) == 0)
-     sprintf (zsend, "R %s %s %s -%s 0x%lx", qcmd->zfrom, qcmd->zto,
--	     qcmd->zuser, qcmd->zoptions, (unsigned long) cbytes);
-+	     qcmd->zuser, qcmd->zoptions, (unsigned long long) cbytes);
-   else
-     sprintf (zsend, "R %s %s %s -%s %ld", qcmd->zfrom, qcmd->zto,
- 	     qcmd->zuser, qcmd->zoptions, cbytes);
-@@ -520,7 +520,7 @@
-      long cfree_space;
- {
-   struct srecinfo *qinfo = (struct srecinfo *) qtrans->pinfo;
--  long cfree1, cfree2;
-+  long long cfree1, cfree2;
- 
-   cfree1 = csysdep_bytes_free (qinfo->ztemp);
-   cfree2 = csysdep_bytes_free (qinfo->zfile);
-@@ -575,7 +575,7 @@
-   char *zfile;
-   openfile_t e;
-   char *ztemp;
--  long cbytes, cbytes2;
-+  long long cbytes, cbytes2;
-   long crestart;
-   struct srecinfo *qinfo;
-   struct stransfer *qtrans;
-@@ -1030,7 +1030,7 @@
- 				? qtrans->s.zuser
- 				: (const char *) NULL)))
- 	{
--	  long cspace;
-+	  long long cspace;
- 
- 	  /* Keep the temporary file if there is 1.5 times the amount
- 	     of required free space.  This is just a random guess, to


Index: uucp.spec
===================================================================
RCS file: /cvs/dist/rpms/uucp/devel/uucp.spec,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- uucp.spec	19 Apr 2005 14:44:52 -0000	1.24
+++ uucp.spec	14 Jul 2005 13:58:42 -0000	1.25
@@ -7,7 +7,7 @@
 Summary: The uucp utility for copying files between systems.
 Name: uucp
 Version: 1.07
-Release: 9
+Release: 10
 License: GPL
 Group: Applications/Communications
 Source0: ftp://ftp.gnu.org/pub/gnu/uucp/uucp-%{version}.tar.gz
@@ -38,7 +38,7 @@
 %patch9 -p1 -b .lfs
 
 %build
-export CFLAGS="-D_FILE_OFFSET_BITS=64"
+export CFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
 %configure --with-newconfigdir=%{_newconfigdir} --with-oldconfigdir=%{_oldconfigdir}
 make all
 
@@ -152,6 +152,11 @@
 %config(noreplace)	%{_newconfigdir}/sys
 
 %changelog
+* Thu Jul 14 2005 Peter Vrabec <pvrabec redhat com> 1.07-10
+- revert fix from 1.07-9
+- fix truncation of values on 32b platforms where statvfs64
+  is being called on a large file system (#153259)
+
 * Mon Apr 19 2005 Peter Vrabec <pvrabec redhat com> 1.07-9
 - long long fsu_bavail in struct fs_usage
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]