Parcourir la source

Get rid of nested warnings

Peter S. Mazinger il y a 19 ans
Parent
commit
ba9a21b2fa

+ 4 - 4
libc/misc/regex/regcomp.c

@@ -805,6 +805,10 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length,
 /* Initialize DFA.  We use the length of the regular expression PAT_LEN
    as the initial length of some arrays.  */
 
+#ifdef __UCLIBC_HAS_WCHAR__
+libc_hidden_proto(_stdlib_mb_cur_max)
+#endif
+
 static reg_errcode_t
 init_dfa (re_dfa_t *dfa, size_t pat_len)
 {
@@ -834,10 +838,6 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
   dfa->state_hash_mask = table_size - 1;
 
 #ifdef __UCLIBC_HAS_WCHAR__
-# undef MB_CUR_MAX
-# define	MB_CUR_MAX	(_stdlib_mb_cur_max ())
-extern size_t _stdlib_mb_cur_max (void) __THROW __wur;
-libc_hidden_proto(_stdlib_mb_cur_max)
   dfa->mb_cur_max = MB_CUR_MAX;
 #else
   dfa->mb_cur_max = 1;

+ 7 - 0
libc/misc/statfs/fstatvfs.c

@@ -27,6 +27,13 @@
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
 
+libc_hidden_proto(memset)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strsep)
+libc_hidden_proto(setmntent)
+libc_hidden_proto(getmntent_r)
+libc_hidden_proto(endmntent)
+
 libc_hidden_proto(fstatfs)
 libc_hidden_proto(fstat)
 libc_hidden_proto(stat)

+ 7 - 0
libc/misc/statfs/fstatvfs64.c

@@ -39,6 +39,13 @@
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
 
+libc_hidden_proto(memset)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strsep)
+libc_hidden_proto(setmntent)
+libc_hidden_proto(getmntent_r)
+libc_hidden_proto(endmntent)
+
 #undef stat
 #define stat stat64
 libc_hidden_proto(fstatfs64)

+ 2 - 7
libc/misc/statfs/internal_statvfs.c

@@ -17,13 +17,6 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
-libc_hidden_proto(memset)
-libc_hidden_proto(strcmp)
-libc_hidden_proto(strsep)
-libc_hidden_proto(setmntent)
-libc_hidden_proto(getmntent_r)
-libc_hidden_proto(endmntent)
-
   /* Now fill in the fields we have information for.  */
   buf->f_bsize = fsbuf.f_bsize;
   /* Linux does not support f_frsize, so set it to the full block size.  */
@@ -90,6 +83,7 @@ libc_hidden_proto(endmntent)
 		      buf->f_flag |= ST_RDONLY;
 		    else if (strcmp (opt, "nosuid") == 0)
 		      buf->f_flag |= ST_NOSUID;
+#ifdef _GNU_SOURCE
 		    else if (strcmp (opt, "noexec") == 0)
 		      buf->f_flag |= ST_NOEXEC;
 		    else if (strcmp (opt, "nodev") == 0)
@@ -102,6 +96,7 @@ libc_hidden_proto(endmntent)
 		      buf->f_flag |= ST_NOATIME;
 		    else if (strcmp (opt, "nodiratime") == 0)
 		      buf->f_flag |= ST_NODIRATIME;
+#endif
 
 		  /* We can stop looking for more entries.  */
 		  break;

+ 7 - 0
libc/misc/statfs/statvfs.c

@@ -27,6 +27,13 @@
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
 
+libc_hidden_proto(memset)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strsep)
+libc_hidden_proto(setmntent)
+libc_hidden_proto(getmntent_r)
+libc_hidden_proto(endmntent)
+
 libc_hidden_proto(statfs)
 libc_hidden_proto(stat)
 

+ 7 - 0
libc/misc/statfs/statvfs64.c

@@ -41,6 +41,13 @@
 #include <sys/statfs.h>
 #include <sys/statvfs.h>
 
+libc_hidden_proto(memset)
+libc_hidden_proto(strcmp)
+libc_hidden_proto(strsep)
+libc_hidden_proto(setmntent)
+libc_hidden_proto(getmntent_r)
+libc_hidden_proto(endmntent)
+
 #undef stat
 #define stat stat64
 libc_hidden_proto(statfs64)

+ 4 - 1
libc/signal/sigintr.c

@@ -25,13 +25,16 @@ libc_hidden_proto(sigaction)
 /* If INTERRUPT is nonzero, make signal SIG interrupt system calls
    (causing them to fail with EINTR); if INTERRUPT is zero, make system
    calls be restarted after signal SIG.  */
+#ifdef SA_RESTART
+extern sigset_t _sigintr attribute_hidden;	/* Defined in signal.c.  */
+#endif
+
 int
 siginterrupt (sig, interrupt)
      int sig;
      int interrupt;
 {
 #ifdef	SA_RESTART
-  extern sigset_t _sigintr attribute_hidden;	/* Defined in signal.c.  */
   struct sigaction action;
 
   if (sigaction (sig, (struct sigaction *) NULL, &action) < 0)