This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Compiling glibc we now get lots of warnings like:
$ grep warning make--out |grep setprotoent
nss_files/files-XXX.c:116: warning: no previous prototype for `_nss_files_setprotoent'
nss_hesiod/hesiod-proto.c:50: warning: no previous prototype for `_nss_hesiod_setprotoent'
nss_nis/nis-proto.c:110: warning: no previous prototype for `_nss_nis_setprotoent'
nss_nisplus/nisplus-proto.c:162: warning: no previous prototype for `_nss_nisplus_setprotoent'
I'd like to fix all these NSS related warnings with a patch like the
following. What do you think? Shall I finish the patch? Or what
needs changing?
Andreas
============================================================
Index: include/nsswitch.h
--- include/nsswitch.h 1997/06/21 01:17:41 1.1
+++ include/nsswitch.h 2000/12/17 19:26:50
@@ -1 +1,24 @@
+#ifndef _NSSWITCH_H
#include <nss/nsswitch.h>
+
+
+/* Now define the internal interfaces. */
+#define DECLARE_NSS_PROTOTYPES(service) \
+extern enum nss_status _nss_ ## service ## _setprotoent (void); \
+extern enum nss_status _nss_ ## service ## _endprotoent (void); \
+extern enum nss_status _nss_ ## service ## _getprotoent_r \
+ (struct protoent *proto, char *buffer, size_t buflen, \
+ int *errnop); \
+extern enum nss_status _nss_ ## service ## _getprotobyname_r \
+ (const char *name, struct protoent *proto, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ## _getprotobynumber_r \
+ (int number, struct protoent *proto, \
+ char *buffer, size_t buflen, int *errnop);
+
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+DECLARE_NSS_PROTOTYPES (hesiod)
+DECLARE_NSS_PROTOTYPES (files)
+
+#endif
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |