projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
NEWS.stable: log cherry-pick [e446f25]->[c092018] relocatable-shell: Update suggested...
[gnulib.git]
/
m4
/
getdomainname.m4
diff --git
a/m4/getdomainname.m4
b/m4/getdomainname.m4
index
86bd73d
..
0789568
100644
(file)
--- a/
m4/getdomainname.m4
+++ b/
m4/getdomainname.m4
@@
-1,5
+1,5
@@
-# getdomainname.m4 serial
5
-dnl Copyright (C) 2002-2003, 2008-201
0
Free Software Foundation, Inc.
+# getdomainname.m4 serial
10
+dnl Copyright (C) 2002-2003, 2008-201
4
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.
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 <http://www.sun.com/software/solaris/programs/abi/appcert_faq.xml#q18>.
dnl We need to avoid a collision with this function.
dnl is discouraged, see
dnl <http://www.sun.com/software/solaris/programs/abi/appcert_faq.xml#q18>.
dnl We need to avoid a collision with this function.
- dnl - Otherwise i
s
is in libc.
+ dnl - Otherwise i
t
is in libc.
AC_CHECK_FUNCS([getdomainname], , [
AC_CACHE_CHECK([for getdomainname in -lnsl],
[gl_cv_func_getdomainname_in_libnsl],
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 <stddef.h>
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stddef.h>
- 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])
]],
[[getdomainname(NULL, 0);]])],
[gl_cv_func_getdomainname_in_libnsl=yes])
@@
-38,18
+42,18
@@
AC_DEFUN([gl_FUNC_GETDOMAINNAME],
dnl What about the declaration?
dnl - It's int getdomainname(char *, size_t) on glibc, NetBSD, OpenBSD.
dnl What about the declaration?
dnl - It's int getdomainname(char *, size_t) on glibc, NetBSD, OpenBSD.
- dnl - It's int getdomainname(char *, int) on MacOS X, FreeBSD, AIX, IRIX,
+ dnl - It's int getdomainname(char *, int) on Mac
OS X, FreeBSD, AIX, IRIX,
dnl OSF/1.
AC_CHECK_DECLS([getdomainname], , ,
dnl OSF/1.
AC_CHECK_DECLS([getdomainname], , ,
- [#include <sys/types.h>
- #ifdef HAVE_SYS_SOCKET_H
- #include <sys/socket.h>
- #endif
- #ifdef HAVE_NETDB_H
- #include <netdb.h>
- #endif
- #include <unistd.h>
- ])
+ [
[
#include <sys/types.h>
+
#ifdef HAVE_SYS_SOCKET_H
+
#include <sys/socket.h>
+
#endif
+
#ifdef HAVE_NETDB_H
+
#include <netdb.h>
+
#endif
+
#include <unistd.h>
+ ]
]
)
AC_CACHE_CHECK([for getdomainname's second argument type],
[gl_cv_decl_getdomainname_argtype2],
[if test $ac_cv_have_decl_getdomainname; then
AC_CACHE_CHECK([for getdomainname's second argument type],
[gl_cv_decl_getdomainname_argtype2],
[if test $ac_cv_have_decl_getdomainname; then
@@
-63,7
+67,12
@@
AC_DEFUN([gl_FUNC_GETDOMAINNAME],
#include <netdb.h>
#endif
#include <unistd.h>
#include <netdb.h>
#endif
#include <unistd.h>
- 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'])
[[]])],
[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
|| 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.
])
# Prerequisites of lib/getdomainname.c.