X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgetdomainname.m4;h=542e4cead44e65459883b06e886a37d884c30dcc;hb=9f60473985e5f20c3efabadf2c1756b5ff560458;hp=86bd73dc17053164372fc541b0f5d4a54f84628a;hpb=b4417f755d2a8e39cb2052dbe949cae5d6971faf;p=gnulib.git diff --git a/m4/getdomainname.m4 b/m4/getdomainname.m4 index 86bd73dc1..542e4cead 100644 --- a/m4/getdomainname.m4 +++ b/m4/getdomainname.m4 @@ -1,5 +1,5 @@ -# getdomainname.m4 serial 5 -dnl Copyright (C) 2002-2003, 2008-2010 Free Software Foundation, Inc. +# getdomainname.m4 serial 8 +dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_GETDOMAINNAME], dnl is discouraged, see dnl . dnl We need to avoid a collision with this function. - dnl - Otherwise is is in libc. + dnl - Otherwise it is in libc. AC_CHECK_FUNCS([getdomainname], , [ AC_CACHE_CHECK([for getdomainname in -lnsl], [gl_cv_func_getdomainname_in_libnsl], @@ -28,7 +28,11 @@ AC_DEFUN([gl_FUNC_GETDOMAINNAME], AC_LINK_IFELSE( [AC_LANG_PROGRAM( [[#include - extern int getdomainname (char *, size_t); + extern + #ifdef __cplusplus + "C" + #endif + int getdomainname (char *, size_t); ]], [[getdomainname(NULL, 0);]])], [gl_cv_func_getdomainname_in_libnsl=yes]) @@ -63,7 +67,12 @@ AC_DEFUN([gl_FUNC_GETDOMAINNAME], #include #endif #include - extern int getdomainname (char *, int);]], + extern + #ifdef __cplusplus + "C" + #endif + int getdomainname (char *, int); + ]], [[]])], [gl_cv_decl_getdomainname_argtype2='int'], [gl_cv_decl_getdomainname_argtype2='size_t']) @@ -82,11 +91,6 @@ AC_DEFUN([gl_FUNC_GETDOMAINNAME], || test "$gl_cv_func_getdomainname_in_libnsl" = yes; then REPLACE_GETDOMAINNAME=1 fi - - if test $HAVE_DECL_GETDOMAINNAME = 0 || test $REPLACE_GETDOMAINNAME = 1; then - AC_LIBOBJ([getdomainname]) - gl_PREREQ_GETDOMAINNAME - fi ]) # Prerequisites of lib/getdomainname.c.