Explorar o código

Use internal versions of strchr and stderr for non-BCC

Peter S. Mazinger %!s(int64=19) %!d(string=hai) anos
pai
achega
1d05822f29
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      libc/unistd/getopt-susv3.c

+ 5 - 1
libc/unistd/getopt-susv3.c

@@ -34,7 +34,11 @@
 #include <string.h>
 #include <stdio.h>
 
+#ifndef __BCC__
 libc_hidden_proto(fprintf)
+libc_hidden_proto(strchr)
+libc_hidden_proto(stderr)
+#endif
 
 #ifdef __UCLIBC_MJN3_ONLY__
 #warning TODO: Enable gettext awareness.
@@ -88,7 +92,7 @@ int getopt(int argc, char * const argv[], const char *optstring)
 #endif
 	retval = (unsigned char) *o; /* Avoid problems for char val of -1. */
 
-	if ((*o == ':') || !(s = __strchr(optstring, *o))) { /* Illegal option? */
+	if ((*o == ':') || !(s = strchr(optstring, *o))) { /* Illegal option? */
 		s = illegal;
 		retval = '?';
 		goto BAD;