aboutsummaryrefslogtreecommitdiff
path: root/gl/m4/servent.m4
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-19 23:27:12 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-08-19 23:27:12 +0200
commit26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch)
treec4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/m4/servent.m4
parent5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff)
downloadmonitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/servent.m4')
-rw-r--r--gl/m4/servent.m412
1 files changed, 8 insertions, 4 deletions
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
index 2ed961a4..01c037a8 100644
--- a/gl/m4/servent.m4
+++ b/gl/m4/servent.m4
@@ -1,5 +1,5 @@
-# servent.m4 serial 1
-dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# servent.m4 serial 2
+dnl Copyright (C) 2008, 2010-2013 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.
@@ -30,12 +30,16 @@ AC_DEFUN([gl_SERVENT],
[gl_cv_w32_getservbyname=no
gl_save_LIBS="$LIBS"
LIBS="$LIBS -lws2_32"
- AC_TRY_LINK([
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
#endif
#include <stddef.h>
-], [getservbyname(NULL,NULL);], [gl_cv_w32_getservbyname=yes])
+ ]],
+ [[getservbyname(NULL,NULL);]])],
+ [gl_cv_w32_getservbyname=yes])
LIBS="$gl_save_LIBS"
])
if test "$gl_cv_w32_getservbyname" = "yes"; then