summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2020-12-06 15:32:11 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2020-12-06 15:32:11 +0000
commit57abdf3eaa424deafda497a4a896328238353e18 (patch)
treebf991c3cec997d65842f52c2e09a8ba439e98e83 /src
parentec85192dacc1bc1ca2efaad4e469d4d1831bce9c (diff)
downloadnsss-57abdf3eaa424deafda497a4a896328238353e18.tar.xz
Prepare for 0.1.0.0, add --enable-libc-includes configure switch
pwd.h, grp.h and shadow.h will not overwrite the libc headers by default anymore; you need to explicitly add the switch.
Diffstat (limited to 'src')
-rw-r--r--src/include/grp.h13
-rw-r--r--src/include/nsss/grp.h19
-rw-r--r--src/include/nsss/pwd.h13
-rw-r--r--src/include/nsss/shadow.h19
-rw-r--r--src/include/pwd.h7
-rw-r--r--src/include/shadow.h13
6 files changed, 51 insertions, 33 deletions
diff --git a/src/include/grp.h b/src/include/grp.h
index a30fe79..7c5b8f9 100644
--- a/src/include/grp.h
+++ b/src/include/grp.h
@@ -10,17 +10,4 @@
#include <nsss/grp.h>
-#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
-#include <sys/types.h>
-extern int setgroups (size_t, gid_t const *) ;
-extern int initgroups (char const *, gid_t) ;
-#endif
-
-#ifdef _GNU_SOURCE
-#include <stdio.h>
-extern struct group *fgetgrent (FILE *) ;
-extern int fgetgrent_r (FILE *, struct group *, char *, size_t, struct group **) ;
-extern int putgrent (struct group const *, FILE *) ;
-#endif
-
#endif
diff --git a/src/include/nsss/grp.h b/src/include/nsss/grp.h
index 0d56cbd..e26ae05 100644
--- a/src/include/nsss/grp.h
+++ b/src/include/nsss/grp.h
@@ -62,6 +62,25 @@ extern "C" {
#endif
#endif
+ /*
+ The following functions are not implemented by nsss.
+ However, the libc may implement them, so we still need to
+ declare them. Of course, we only declare functions that
+ do not conflict with nsss operation.
+ */
+
+#if defined(_GNU_SOURCE) || defined(_DEFAULT_SOURCE)
+#include <sys/types.h>
+extern int setgroups (size_t, gid_t const *) ;
+extern int initgroups (char const *, gid_t) ;
+#endif
+
+#ifdef _GNU_SOURCE
+#include <stdio.h>
+extern struct group *fgetgrent (FILE *) ;
+extern int fgetgrent_r (FILE *, struct group *, char *, size_t, struct group **) ;
+extern int putgrent (struct group const *, FILE *) ;
+#endif
#ifdef __cplusplus
}
diff --git a/src/include/nsss/pwd.h b/src/include/nsss/pwd.h
index 950a5ce..f3c7000 100644
--- a/src/include/nsss/pwd.h
+++ b/src/include/nsss/pwd.h
@@ -50,6 +50,19 @@ extern "C" {
#endif
#endif
+ /*
+ The following functions are not implemented by nsss.
+ However, the libc may implement them, so we still need to
+ declare them. Of course, we only declare functions that
+ do not conflict with nsss operation.
+ */
+
+#ifdef _GNU_SOURCE
+#include <stdio.h>
+extern struct passwd *fgetpwent (FILE *) ;
+extern int fgetpwent_r (FILE *, struct passwd *, char *, size_t, struct passwd **) ;
+extern int putpwent (struct passwd const *, FILE *) ;
+#endif
#ifdef __cplusplus
}
diff --git a/src/include/nsss/shadow.h b/src/include/nsss/shadow.h
index c3357fd..5665fc8 100644
--- a/src/include/nsss/shadow.h
+++ b/src/include/nsss/shadow.h
@@ -44,6 +44,25 @@ extern "C" {
#endif
#endif
+ /*
+ The following functions are not implemented by nsss.
+ However, the libc may implement them, so we still need to
+ declare them. Of course, we only declare functions that
+ do not conflict with nsss operation.
+ */
+
+#include <stdio.h>
+
+extern struct spwd *fgetspent (FILE *) ;
+extern struct spwd *sgetspent (char const *) ;
+extern int putspent (struct spwd const *, FILE *) ;
+extern int lckpwdf (void) ;
+extern int ulckpwdf (void) ;
+
+#ifdef _DEFAULT_SOURCE
+extern int fgetspent_r(FILE *, struct spwd *, char *, size_t, struct spwd **) ;
+extern int sgetspent_r (char const *, struct spwd *, char *, size_t, struct spwd **) ;
+#endif
#ifdef __cplusplus
}
diff --git a/src/include/pwd.h b/src/include/pwd.h
index 6ad4faf..22aa835 100644
--- a/src/include/pwd.h
+++ b/src/include/pwd.h
@@ -10,11 +10,4 @@
#include <nsss/pwd.h>
-#ifdef _GNU_SOURCE
-#include <stdio.h>
-extern struct passwd *fgetpwent (FILE *) ;
-extern int fgetpwent_r (FILE *, struct passwd *, char *, size_t, struct passwd **) ;
-extern int putpwent (struct passwd const *, FILE *) ;
-#endif
-
#endif
diff --git a/src/include/shadow.h b/src/include/shadow.h
index 00d1944..96a2719 100644
--- a/src/include/shadow.h
+++ b/src/include/shadow.h
@@ -10,17 +10,4 @@
#include <nsss/shadow.h>
-#include <stdio.h>
-
-extern struct spwd *fgetspent (FILE *) ;
-extern struct spwd *sgetspent (char const *) ;
-extern int putspent (struct spwd const *, FILE *) ;
-extern int lckpwdf (void) ;
-extern int ulckpwdf (void) ;
-
-#ifdef _DEFAULT_SOURCE
-extern int fgetspent_r(FILE *, struct spwd *, char *, size_t, struct spwd **) ;
-extern int sgetspent_r (char const *, struct spwd *, char *, size_t, struct spwd **) ;
-#endif
-
#endif