You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.1 KiB

--- a/lib/getline.h
+++ b/lib/getline.h
@@ -27,6 +27,7 @@
# endif
# endif
+# if defined (__GLIBC__)
# if __GLIBC__ < 2
int
getline PARAMS ((char **_lineptr, size_t *_n, FILE *_stream));
@@ -34,5 +35,6 @@
int
getdelim PARAMS ((char **_lineptr, size_t *_n, int _delimiter, FILE *_stream));
# endif
+# endif
#endif /* not GETLINE_H_ */
--- a/lib/realloc.c
+++ b/lib/realloc.c
@@ -20,21 +20,15 @@
#if HAVE_CONFIG_H
# include <config.h>
#endif
-#undef realloc
-#include <sys/types.h>
-
-char *malloc ();
-char *realloc ();
+#include <stdlib.h>
/* Change the size of an allocated block of memory P to N bytes,
with error checking. If N is zero, change it to 1. If P is NULL,
use malloc. */
char *
-rpl_realloc (p, n)
- char *p;
- size_t n;
+rpl_realloc (char *p, size_t n)
{
if (n == 0)
n = 1;
--- a/lib/xmalloc.c
+++ b/lib/xmalloc.c
@@ -20,15 +20,7 @@
#endif
#include <sys/types.h>
-
-#if STDC_HEADERS
-# include <stdlib.h>
-#else
-void *calloc ();
-void *malloc ();
-void *realloc ();
-void free ();
-#endif
+#include <stdlib.h>
#if ENABLE_NLS
# include <libintl.h>