Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/include protect against multiple declarations.
details: https://anonhg.NetBSD.org/src/rev/ee8e664e6ea4
branches: trunk
changeset: 500810:ee8e664e6ea4
user: christos <christos%NetBSD.org@localhost>
date: Mon Dec 18 21:22:00 2000 +0000
description:
protect against multiple declarations.
diffstat:
include/errno.h | 4 +++-
include/stdio.h | 6 +++++-
include/unistd.h | 27 +++++++++++++++++++++++----
3 files changed, 31 insertions(+), 6 deletions(-)
diffs (126 lines):
diff -r 1f5735be8e87 -r ee8e664e6ea4 include/errno.h
--- a/include/errno.h Mon Dec 18 21:21:26 2000 +0000
+++ b/include/errno.h Mon Dec 18 21:22:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: errno.h,v 1.3 2000/06/13 01:21:53 simonb Exp $ */
+/* $NetBSD: errno.h,v 1.4 2000/12/18 21:22:00 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -48,8 +48,10 @@
#include <sys/featuretest.h>
__BEGIN_DECLS
+#ifndef errno
int *__errno __P((void));
#define errno (*__errno())
+#endif
#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
!defined(_XOPEN_SOURCE)
diff -r 1f5735be8e87 -r ee8e664e6ea4 include/stdio.h
--- a/include/stdio.h Mon Dec 18 21:21:26 2000 +0000
+++ b/include/stdio.h Mon Dec 18 21:22:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: stdio.h,v 1.39 2000/11/15 15:44:05 briggs Exp $ */
+/* $NetBSD: stdio.h,v 1.40 2000/12/18 21:22:00 christos Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -272,7 +272,11 @@
__BEGIN_DECLS
char *ctermid __P((char *));
+#ifndef __CUSERID_DECLARED
+#define __CUSERID_DECLARED
+/* also declared in unistd.h */
char *cuserid __P((char *));
+#endif /* __CUSERID_DECLARED */
FILE *fdopen __P((int, const char *));
int fileno __P((FILE *));
__END_DECLS
diff -r 1f5735be8e87 -r ee8e664e6ea4 include/unistd.h
--- a/include/unistd.h Mon Dec 18 21:21:26 2000 +0000
+++ b/include/unistd.h Mon Dec 18 21:22:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unistd.h,v 1.85 2000/06/27 05:51:54 kleink Exp $ */
+/* $NetBSD: unistd.h,v 1.86 2000/12/18 21:22:00 christos Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -103,7 +103,11 @@
#endif /* defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) */
int close __P((int));
size_t confstr __P((int, char *, size_t));
+#ifndef __CUSERID_DECLARED
+#define __CUSERID_DECLARED
+/* also declared in stdio.h */
char *cuserid __P((char *)); /* obsolete */
+#endif /* __CUSERID_DECLARED */
int dup __P((int));
int dup2 __P((int, int));
int execl __P((const char *, const char *, ...));
@@ -126,7 +130,6 @@
uid_t getuid __P((void));
int isatty __P((int));
int link __P((const char *, const char *));
-off_t lseek __P((int, off_t, int));
long pathconf __P((const char *, int));
int pause __P((void));
int pipe __P((int *));
@@ -160,6 +163,14 @@
/*
+ * The following three syscalls are also defined in <sys/types.h>
+ * We protect them against double declarations.
+ */
+#ifndef __OFF_T_SYSCALLS_DECLARED
+#define __OFF_T_SYSCALLS_DECLARED
+off_t lseek __P((int, off_t, int));
+int truncate __P((const char *, off_t));
+/*
* IEEE Std 1003.1b-93,
* also found in X/Open Portability Guide >= Issue 4 Verion 2
*/
@@ -169,6 +180,7 @@
(_XOPEN_SOURCE - 0) >= 500
int ftruncate __P((int, off_t));
#endif
+#endif /* __OFF_T_SYSCALLS_DECLARED */
/*
@@ -254,7 +266,6 @@
void swab __P((const void *, void *, size_t));
int symlink __P((const char *, const char *));
void sync __P((void));
-int truncate __P((const char *, off_t));
useconds_t ualarm __P((useconds_t, useconds_t));
int usleep __P((useconds_t));
#ifdef __LIBC12_SOURCE__
@@ -306,7 +317,11 @@
int issetugid __P((void));
int nfssvc __P((int, void *));
int profil __P((char *, size_t, u_long, u_int));
-void psignal __P((unsigned int, const char *));
+#ifndef __PSIGNAL_DECLARED
+#define __PSIGNAL_DECLARED
+/* also in signal.h */
+void psignal __P((unsigned int, const char *));
+#endif /* __PSIGNAL_DECLARED */
int rcmd __P((char **, int, const char *,
const char *, const char *, int *));
int reboot __P((int, char *));
@@ -339,7 +354,11 @@
int iruserok_sa __P((const void *, int, int, const char *, const char *));
#endif
+#ifndef __SYS_SIGLIST_DECLARED
+#define __SYS_SIGLIST_DECLARED
+/* also in signal.h */
extern __const char *__const *sys_siglist __RENAME(__sys_siglist14);
+#endif /* __SYS_SIGLIST_DECLARED */
extern int optreset; /* getopt(3) external variable */
extern char *suboptarg; /* getsubopt(3) external variable */
#endif
Home |
Main Index |
Thread Index |
Old Index