Explorar el Código

limit visibility of ffs function declaration to _XOPEN_SOURCE

per the standard, ffs is XSI shaded, whereas the other functions in
this header are in the base.
Rich Felker hace 10 años
padre
commit
38db09374a
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      include/strings.h

+ 2 - 0
include/strings.h

@@ -20,7 +20,9 @@ char *index (const char *, int);
 char *rindex (const char *, int);
 #endif
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE)  || defined(_BSD_SOURCE)
 int ffs (int);
+#endif
 
 int strcasecmp (const char *, const char *);
 int strncasecmp (const char *, const char *, size_t);