"Tinsley, Scott S. (ManTech) CTR" <[EMAIL PROTECTED]> writes:

> I included the output from the make in case it might be useful to you.

> cc: "/usr/include/sys/socket.h", line 504: warning 562: Redeclaration of 
> "sendfile" with a different storage class specifier: "sendfile" will have 
> internal linkage.
> cc: "/usr/include/sys/socket.h", line 505: warning 562: Redeclaration of 
> "sendpath" with a different storage class specifier: "sendpath" will have 
> internal linkage.

Sorry, I can't debug this one without more info.  Why were sendfile and
sendpath being redefined?  Perhaps you can look at the include files
and figure out what happened.

> cc: "fsusage.c", line 247: warning 950: Shift amount should be in the range 
> of zero through 31 bits.

This sort of message is due to what I would call a bug in the HP compiler.
It is complaining about expressions like this:

  (0 ? 1 << 32 : 0)

even though they have perfectly well-defined behavior on your host.
Perhaps you can file a bug with HP about this?  But anyway, in the
meantime, we can ignore these diagnostics.

> cpp: "same.c", line 50: warning 2001: Redefinition of macro MIN.
> cc: "fsusage.c", line 75: warning 562: Redeclaration of "statvfs" with a 
> different storage class specifier: "statvfs" will have internal linkage.
> cc: "copy.h", line 174: warning 562: Redeclaration of "stat" with a different 
> storage class specifier: "stat" will have internal linkage.
> cc: "copy.h", line 175: warning 562: Redeclaration of "lstat" with a 
> different storage class specifier: "lstat" will have internal linkage.
> cc: "install.c", line 76: warning 562: Redeclaration of "stat" with a 
> different storage class specifier: "stat" will have internal linkage.

These diagnostics all look valid to me.  Thanks for reporting them.
I installed the following patch.

2004-11-25  Paul Eggert  <[EMAIL PROTECTED]>

        Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
        HP's ANSI C compiler.

        First, declaring int functions causes warnings on some modern
        systems and shouldn't be needed to compile on ancient ones.
        * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
        * src/copy.h (stat, lstat, rename): Remove decls.
        * src/install.c (stat): Remove decl.
        * src/ln.c (link, symlink): Remove decls.

        Second:
        * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
        defined.

Index: lib/fsusage.c
===================================================================
RCS file: /fetish/cu/lib/fsusage.c,v
retrieving revision 1.48
diff -p -u -r1.48 fsusage.c
--- lib/fsusage.c       2 Aug 2004 18:44:11 -0000       1.48
+++ lib/fsusage.c       26 Nov 2004 07:31:13 -0000
@@ -74,7 +74,6 @@
 
 #if HAVE_SYS_STATVFS_H         /* SVR4 */
 # include <sys/statvfs.h>
-int statvfs ();
 #endif
 
 #include "full-read.h"
Index: lib/same.c
===================================================================
RCS file: /fetish/cu/lib/same.c,v
retrieving revision 1.13
diff -p -u -r1.13 same.c
--- lib/same.c  2 Aug 2004 22:53:41 -0000       1.13
+++ lib/same.c  26 Nov 2004 07:31:13 -0000
@@ -46,7 +46,9 @@
 #include "error.h"
 #include "xalloc.h"
 
-#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#ifndef MIN
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+#endif
 
 #define SAME_INODE(Stat_buf_1, Stat_buf_2) \
   ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
Index: src/copy.h
===================================================================
RCS file: /fetish/cu/src/copy.h,v
retrieving revision 1.30
diff -p -u -r1.30 copy.h
--- src/copy.h  30 Jul 2004 07:49:39 -0000      1.30
+++ src/copy.h  26 Nov 2004 07:31:13 -0000
@@ -172,9 +172,6 @@ struct cp_options
   Hash_table *src_info;
 };
 
-int stat ();
-int lstat ();
-
 # define XSTAT(X, Src_path, Src_sb) \
   ((X)->dereference == DEREF_NEVER \
    ? lstat (Src_path, Src_sb) \
@@ -189,8 +186,6 @@ int rpl_lstat (const char *, struct stat
 #  define lstat rpl_lstat
 # endif
 
-int rename ();
-
 /* Arrange to make rename calls go through the wrapper function
    on systems with a rename function that fails for a source path
    specified with a trailing slash.  */
Index: src/install.c
===================================================================
RCS file: /fetish/cu/src/install.c,v
retrieving revision 1.171
diff -p -u -r1.171 install.c
--- src/install.c       21 Nov 2004 07:29:31 -0000      1.171
+++ src/install.c       26 Nov 2004 07:31:14 -0000
@@ -72,8 +72,6 @@ gid_t getgid ();
 /* Number of bytes of a file to copy at a time. */
 #define READ_SIZE (32 * 1024)
 
-int stat ();
-
 static bool change_timestamps (const char *from, const char *to);
 static bool change_attributes (const char *path);
 static bool copy_file (const char *from, const char *to,
Index: src/ln.c
===================================================================
RCS file: /fetish/cu/src/ln.c,v
retrieving revision 1.145
diff -p -u -r1.145 ln.c
--- src/ln.c    21 Sep 2004 22:26:42 -0000      1.145
+++ src/ln.c    26 Nov 2004 07:31:14 -0000
@@ -39,12 +39,6 @@
 # define ENABLE_HARD_LINK_TO_SYMLINK_WARNING 0
 #endif
 
-int link ();                   /* Some systems don't declare this anywhere. */
-
-#ifdef S_ISLNK
-int symlink ();
-#endif
-
 /* In being careful not even to try to make hard links to directories,
    we have to know whether link(2) follows symlinks.  If it does, then
    we have to *stat* the `source' to see if the resulting link would be


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to