This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch to add arguments to prototype declarations in system.h



This patch adds arguments to the prototype declarations in system.h.

Okay to install?

		--Kaveh



1999-12-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>

	* system.h (bcopy, bcmp, bzero, index, rindex, atof, atol, free,
	getcwd, getenv, getwd, sbrk, strstr, malloc, calloc, realloc,
	strerror, getrlimit, setrlimit, abort): Add prototype arguments.

diff -rup orig/egcs-CVS19991228/gcc/system.h egcs-CVS19991228/gcc/system.h
--- orig/egcs-CVS19991228/gcc/system.h	Mon Dec 27 10:35:45 1999
+++ egcs-CVS19991228/gcc/system.h	Tue Dec 28 07:51:52 1999
@@ -291,7 +291,7 @@ extern int errno;
 #ifndef bcopy
 # ifdef HAVE_BCOPY
 #  ifdef NEED_DECLARATION_BCOPY
-extern void bcopy ();
+extern void bcopy PARAMS ((const PTR, PTR, size_t));
 #  endif
 # else /* ! HAVE_BCOPY */
 #  define bcopy(src,dst,len) memmove((dst),(src),(len))
@@ -301,7 +301,7 @@ extern void bcopy ();
 #ifndef bcmp
 # ifdef HAVE_BCMP
 #  ifdef NEED_DECLARATION_BCMP
-extern int bcmp ();
+extern int bcmp PARAMS ((const PTR, const PTR, size_t));
 #  endif
 # else /* ! HAVE_BCMP */
 #  define bcmp(left,right,len) memcmp ((left),(right),(len))
@@ -311,7 +311,7 @@ extern int bcmp ();
 #ifndef bzero
 # ifdef HAVE_BZERO
 #  ifdef NEED_DECLARATION_BZERO
-extern void bzero ();
+extern void bzero PARAMS ((PTR, size_t));
 #  endif
 # else /* ! HAVE_BZERO */
 #  define bzero(dst,len) memset ((dst),0,(len))
@@ -321,7 +321,7 @@ extern void bzero ();
 #ifndef index
 # ifdef HAVE_INDEX
 #  ifdef NEED_DECLARATION_INDEX
-extern char *index ();
+extern char *index PARAMS ((const char *, int));
 #  endif
 # else /* ! HAVE_INDEX */
 #  define index strchr
@@ -331,7 +331,7 @@ extern char *index ();
 #ifndef rindex
 # ifdef HAVE_RINDEX
 #  ifdef NEED_DECLARATION_RINDEX
-extern char *rindex ();
+extern char *rindex PARAMS ((const char *, int));
 #  endif
 # else /* ! HAVE_RINDEX */
 #  define rindex strrchr
@@ -339,35 +339,35 @@ extern char *rindex ();
 #endif
 
 #ifdef NEED_DECLARATION_ATOF
-extern double atof ();
+extern double atof PARAMS ((const char *));
 #endif
 
 #ifdef NEED_DECLARATION_ATOL
-extern long atol();
+extern long atol PARAMS ((const char *));
 #endif
 
 #ifdef NEED_DECLARATION_FREE
-extern void free ();
+extern void free PARAMS ((PTR));
 #endif
 
 #ifdef NEED_DECLARATION_GETCWD
-extern char *getcwd ();
+extern char *getcwd PARAMS ((char *, size_t));
 #endif
 
 #ifdef NEED_DECLARATION_GETENV
-extern char *getenv ();
+extern char *getenv PARAMS ((const char *));
 #endif
 
 #ifdef NEED_DECLARATION_GETWD
-extern char *getwd ();
+extern char *getwd PARAMS ((char *));
 #endif
 
 #ifdef NEED_DECLARATION_SBRK
-extern PTR sbrk ();
+extern PTR sbrk PARAMS ((int));
 #endif
 
 #ifdef NEED_DECLARATION_STRSTR
-extern char *strstr ();
+extern char *strstr PARAMS ((const char *, const char *));
 #endif
 
 #ifdef HAVE_MALLOC_H
@@ -375,21 +375,21 @@ extern char *strstr ();
 #endif
 
 #ifdef NEED_DECLARATION_MALLOC
-extern PTR malloc ();
+extern PTR malloc PARAMS ((size_t));
 #endif
 
 #ifdef NEED_DECLARATION_CALLOC
-extern PTR calloc ();
+extern PTR calloc PARAMS ((size_t, size_t));
 #endif
 
 #ifdef NEED_DECLARATION_REALLOC
-extern PTR realloc ();
+extern PTR realloc PARAMS ((PTR, size_t));
 #endif
 
 #ifdef HAVE_STRERROR
 # ifdef NEED_DECLARATION_STRERROR
 #  ifndef strerror
-extern char *strerror ();
+extern char *strerror PARAMS ((int));
 #  endif
 # endif
 #else /* ! HAVE_STRERROR */
@@ -408,7 +408,10 @@ extern const char *strsignal PARAMS ((in
 #ifdef HAVE_GETRLIMIT
 # ifdef NEED_DECLARATION_GETRLIMIT
 #  ifndef getrlimit
-extern int getrlimit ();
+#   ifdef ANSI_PROTOTYPES
+struct rlimit;
+#   endif
+extern int getrlimit PARAMS ((int, struct rlimit *));
 #  endif
 # endif
 #endif
@@ -416,7 +419,10 @@ extern int getrlimit ();
 #ifdef HAVE_SETRLIMIT
 # ifdef NEED_DECLARATION_SETRLIMIT
 #  ifndef setrlimit
-extern int setrlimit ();
+#   ifdef ANSI_PROTOTYPES
+struct rlimit;
+#   endif
+extern int setrlimit PARAMS ((int, const struct rlimit *));
 #  endif
 # endif
 #endif
@@ -428,7 +434,7 @@ extern int setrlimit ();
 #endif
 
 #ifdef NEED_DECLARATION_ABORT
-extern void abort ();
+extern void abort PARAMS ((void));
 #endif
 
 /* Define a STRINGIFY macro that's right for ANSI or traditional C.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]