Bug:
        The function fseek() should be given a long as a second
        argument (see ANSI standard).  Here a off_t was used.
        They are not the same on all platforms.
OSes/Compiler:
        These fixes were needed to make Amanda 2.4.1p1 compile
        on one of the platforms (below).  These changes were
        carried forward to 2.4.2.  I am not sure which platform
        required this change, but this same code was subsequently
        used to compile successfully on:
                Solaris 2.4     gcc
                Solaris 2.5.1   gcc
                Solaris 2.6     gcc
                Solaris 8       cc
                AIX4.2.1        cc
                AIX4.3.3        cc
                FreeBSD3.x      cc
                HP-UX9.05       cc
                HP-UX10.02      cc
                Linux2.2        gcc
                Unixware2.1     cc
Hardware:
        Irrelevant, but Exabyte 230D.

Index: client-src/sendsize.c
===================================================================
RCS file: /u/itsrc/cvs/backup/amanda/client-src/sendsize.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.2.1
diff -u -r1.1.1.2 -r1.1.1.2.2.1
--- sendsize.c  2000/11/27 21:24:55     1.1.1.2
+++ sendsize.c  2000/11/27 22:13:05     1.1.1.2.2.1
@@ -479,7 +479,7 @@
 
            amflock(1, "size");
 
-           fseek(stdout, (off_t)0, SEEK_SET);
+           fseek(stdout, (long)0, SEEK_SET);
 
            printf("%s %d SIZE %ld\n", est->amname, level, size);
            fflush(stdout);
@@ -504,7 +504,7 @@
 
            amflock(1, "size");
 
-           fseek(stdout, (off_t)0, SEEK_SET);
+           fseek(stdout, (long)0, SEEK_SET);
 
            printf("%s %d SIZE %ld\n", est->amname, level, size);
            fflush(stdout);
@@ -531,7 +531,7 @@
 
          amflock(1, "size");
 
-         fseek(stdout, (off_t)0, SEEK_SET);
+         fseek(stdout, (long)0, SEEK_SET);
 
          printf("%s %d SIZE %ld\n", est->amname, level, size);
          fflush(stdout);

Reply via email to