added params to func decls when STDC_HEADERS is not defined

This commit is contained in:
Todd C. Miller
1994-08-08 04:06:48 +00:00
parent a3bbe79d68
commit 38b6d5f1df
5 changed files with 27 additions and 18 deletions

View File

@@ -56,15 +56,15 @@ static char rcsid[] = "$Id$";
#include "sudo.h" #include "sudo.h"
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern char *malloc(); extern char *malloc __P((unsigned));
extern char *getenv(); extern char *getenv __P((char *));
extern char *strcpy(); extern char *strcpy __P((char *, char *));
extern int fprintf(); extern int fprintf __P((FILE *, const char *, ...));
extern int readlink(); extern int readlink __P((char *, char *, int));
extern int stat(); extern int stat __P((char *, struct stat *));
extern int lstat(); extern int lstat __P((char *, struct stat *));
#ifdef HAVE_STRDUP #ifdef HAVE_STRDUP
extern char *strdup(); extern char *strdup __P((char *));
#endif /* HAVE_STRDUP */ #endif /* HAVE_STRDUP */
#endif /* !STDC_HEADERS */ #endif /* !STDC_HEADERS */

View File

@@ -55,9 +55,13 @@ static char rcsid[] = "$Id$";
#include <sys/param.h> #include <sys/param.h>
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern char *strcpy(); extern char *strcpy __P((char *, char *));
extern int readlink(); extern int strlen __P((char *));
extern int lstat(); extern char *getwd __P((char *));
extern char *malloc __P((unsigned));
extern FILE *popen __P((char *, char *);
extern int pclose __P((FILE *));
extern char *fgets __P((char *, int, FILE *));
#endif /* !STDC_HEADERS */ #endif /* !STDC_HEADERS */

10
getwd.c
View File

@@ -55,9 +55,13 @@ static char rcsid[] = "$Id$";
#include <sys/param.h> #include <sys/param.h>
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern char *strcpy(); extern char *strcpy __P((char *, char *));
extern int readlink(); extern int strlen __P((char *));
extern int lstat(); extern char *getwd __P((char *));
extern char *malloc __P((unsigned));
extern FILE *popen __P((char *, char *);
extern int pclose __P((FILE *));
extern char *fgets __P((char *, int, FILE *));
#endif /* !STDC_HEADERS */ #endif /* !STDC_HEADERS */

View File

@@ -53,8 +53,8 @@ static char rcsid[] = "$Id$";
#endif /* HAVE_MALLOC_H */ #endif /* HAVE_MALLOC_H */
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern char *malloc(); extern char *malloc __P((unsigned));
extern char *strcpy(); extern char *strcpy __P((char *, char *));
#endif /* !STDC_HEADERS */ #endif /* !STDC_HEADERS */

5
sudo.c
View File

@@ -85,9 +85,9 @@ static char rcsid[] = "$Id$";
#include "version.h" #include "version.h"
#ifndef STDC_HEADERS #ifndef STDC_HEADERS
extern char *malloc(); extern char *malloc __P((unsigned));
#ifdef HAVE_STRDUP #ifdef HAVE_STRDUP
extern char *strdup(); extern char *strdup __P((char *));
#endif /* HAVE_STRDUP */ #endif /* HAVE_STRDUP */
#endif /* STDC_HEADERS */ #endif /* STDC_HEADERS */
@@ -129,6 +129,7 @@ main(argc, argv)
{ {
int rtn; int rtn;
int sudo_mode = MODE_RUN; int sudo_mode = MODE_RUN;
extern char ** environ;
Argv = argv; Argv = argv;
Argc = argc; Argc = argc;