X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=x2p%2Futil.c;h=ab24808d73b19bac865dc4d8bfdc2928843abc33;hb=b844f03e71077069122b6f1194667733997dd055;hp=f8e342cb5418104f2e27139d46d3c983af5238aa;hpb=e9cb6d146cf75820a5771a80b499a65f1217c427;p=p5sagit%2Fp5-mst-13.2.git diff --git a/x2p/util.c b/x2p/util.c index f8e342c..ab24808 100644 --- a/x2p/util.c +++ b/x2p/util.c @@ -1,6 +1,6 @@ /* $RCSfile: util.c,v $$Revision: 4.1 $$Date: 92/08/07 18:29:29 $ * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-2001, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -13,9 +13,7 @@ #include "INTERN.h" #include "util.h" -#ifdef I_STDARG -# include -#endif +#include #define FLUSH static char nomem[] = "Out of memory!\n"; @@ -42,6 +40,7 @@ safemalloc(MEM_SIZE size) exit(1); } /*NOTREACHED*/ + return 0; } /* paranoid version of realloc */ @@ -66,6 +65,7 @@ saferealloc(Malloc_t where, MEM_SIZE size) exit(1); } /*NOTREACHED*/ + return 0; } /* safe version of free */ @@ -176,16 +176,9 @@ growstr(char **strptr, int *curlen, int newlen) } void -#if defined(I_STDARG) && defined(HAS_VPRINTF) croak(char *pat,...) -#else /* I_STDARG */ -/*VARARGS1*/ -croak(pat,a1,a2,a3,a4) - char *pat; - int a1,a2,a3,a4; -#endif /* I_STDARG */ { -#if defined(I_STDARG) && defined(HAS_VPRINTF) +#if defined(HAS_VPRINTF) va_list args; va_start(args, pat); @@ -197,16 +190,9 @@ croak(pat,a1,a2,a3,a4) } void -#if defined(I_STDARG) && defined(HAS_VPRINTF) fatal(char *pat,...) -#else /* I_STDARG */ -/*VARARGS1*/ -fatal(pat,a1,a2,a3,a4) - char *pat; - int a1,a2,a3,a4; -#endif /* I_STDARG */ { -#if defined(I_STDARG) && defined(HAS_VPRINTF) +#if defined(HAS_VPRINTF) va_list args; va_start(args, pat); @@ -217,17 +203,13 @@ fatal(pat,a1,a2,a3,a4) exit(1); } +#if defined(__APPLE_CC__) +__private_extern__ /* warn() conflicts with libc */ +#endif void -#if defined(I_STDARG) && defined(HAS_VPRINTF) warn(char *pat,...) -#else /* I_STDARG */ -/*VARARGS1*/ -warn(pat,a1,a2,a3,a4) - char *pat; - int a1,a2,a3,a4; -#endif /* I_STDARG */ { -#if defined(I_STDARG) && defined(HAS_VPRINTF) +#if defined(HAS_VPRINTF) va_list args; va_start(args, pat);