X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fstrerror.c;h=ba837e32332071f6ad54e483e9d1eaf17bfb3563;hb=6ad8a379a0373bab68623cb568d2a07d96cf5df8;hp=644cc75462aee8bcf7d07a6254955060ff0d839b;hpb=5b64ad42d36e6d487e1f7287d37fbc243a178e72;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/strerror.c b/libiberty/strerror.c index 644cc75462..ba837e3233 100644 --- a/libiberty/strerror.c +++ b/libiberty/strerror.c @@ -13,6 +13,7 @@ incompatible with our later declaration, perhaps by using const attributes. So we hide the declaration in errno.h (if any) using a macro. */ +#define sys_nerr sys_nerr__ #define sys_errlist sys_errlist__ #endif @@ -20,19 +21,23 @@ #include #ifdef HAVE_SYS_ERRLIST +#undef sys_nerr #undef sys_errlist #endif /* Routines imported from standard C runtime libraries. */ -#ifdef __STDC__ -#include -extern void *malloc (size_t size); /* 4.10.3.3 */ -extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */ -#else /* !__STDC__ */ -extern char *malloc (); /* Standard memory allocater */ -extern char *memset (); -#endif /* __STDC__ */ +#ifdef HAVE_STDLIB_H +#include +#else +extern PTR malloc (); +#endif + +#ifdef HAVE_STRING_H +#include +#else +extern PTR memset (); +#endif #ifndef MAX # define MAX(a,b) ((a) > (b) ? (a) : (b))