diff options
| author | Michael Stahl <mstahl@redhat.com> | 2012-01-28 20:18:21 +0100 |
|---|---|---|
| committer | Michael Stahl <mstahl@redhat.com> | 2012-01-28 20:18:21 +0100 |
| commit | 97a0d15e61e991e84e6229ea90f6fc7fc301b379 (patch) | |
| tree | 1420a4a22edf83393ce9921cc2bb90ad607d9042 /acinclude.m4 | |
| parent | f9aa949d90236c3e64450544c62e62d997a55b45 (diff) | |
replace obsolete "master" branch with README that points at new repoHEADmaster-deletedmaster
Diffstat (limited to 'acinclude.m4')
| -rw-r--r-- | acinclude.m4 | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index a42a0f1ce..000000000 --- a/acinclude.m4 +++ /dev/null @@ -1,120 +0,0 @@ -dnl @synopsis AX_FUNC_WHICH_GETSPNAM_R -dnl -dnl Determines which historical variant of the getspnam_r() call -dnl (taking four or five arguments) is available on the system -dnl and sets NEW_SHADOW_API=YES if there are five arguments. -dnl -dnl Originally named "AX_FUNC_WHICH_GETHOSTBYNAME_R". Rewritten -dnl for AX_FUNC_WHICH_GETSPNAM_R -dnl -dnl @author Caolan McNamara <caolan@skynet.ie> -dnl @author Daniel Richard G. <skunk@iskunk.org> -dnl @version 2006-05-01 -dnl @license LGPL - -AC_DEFUN([AX_FUNC_WHICH_GETSPNAM_R], [ - - AC_LANG_PUSH(C) - AC_MSG_CHECKING([how many arguments getspnam_r() takes]) - - AC_CACHE_VAL(ac_cv_func_which_getspnam_r, [ - -################################################################ - -ac_cv_func_which_getspnam_r=unknown - -# -# ONE ARGUMENT (sanity check) -# - -# This should fail, as there is no variant of getspnam_r() that takes -# a single argument. If it actually compiles, then we can assume that -# netdb.h is not declaring the function, and the compiler is thereby -# assuming an implicit prototype. In which case, we're out of luck. -# -AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - [[ - #include <sys/types.h> - #include <shadow.h> - ]], - [[ - const char *name = "myname"; - getspnam_r(name) /* ; */ - ]]), - ac_cv_func_which_getspnam_r=no) - -# -# FIVE ARGUMENTS -# - -if test "$ac_cv_func_which_getspnam_r" = "unknown"; then - -AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - [[ - #include <sys/types.h> - #include <shadow.h> - ]], - [[ - char buffer[[]] = { '\0' }; - struct spwd spwdStruct; - const char *name = "myname"; - getspnam_r(name, &spwdStruct, buffer, sizeof buffer, 0) /* ; */ - ]]), - ac_cv_func_which_getspnam_r=five) - -fi - -# -# FOUR ARGUMENTS -# - -if test "$ac_cv_func_which_getspnam_r" = "unknown"; then - -AC_COMPILE_IFELSE( - AC_LANG_PROGRAM( - [[ - #include <sys/types.h> - #include <shadow.h> - ]], - [[ - char buffer[[]] = { '\0' }; - struct spwd spwdStruct; - const char *name = "myname"; - getspnam_r(name, &spwdStruct, buffer, sizeof buffer) /* ; */ - ]]), - ac_cv_func_which_getspnam_r=four) - -fi - -################################################################ - -]) dnl end AC_CACHE_VAL - -case "$ac_cv_func_which_getspnam_r" in - five) - AC_MSG_RESULT([five]) - NEW_SHADOW_API=YES - ;; - - four) - AC_MSG_RESULT([four]) - ;; - - no) - AC_MSG_RESULT([cannot find function declaration in shadow.h]) - ;; - - unknown) - AC_MSG_RESULT([can't tell]) - ;; - - *) - AC_MSG_ERROR([internal error]) - ;; -esac - -AC_LANG_POP(C) - -]) dnl end AC_DEFUN |
