diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 23:27:12 +0200 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2013-08-19 23:27:12 +0200 |
commit | 26fbe7f1e68bb0c96da32491efcf3696fe6c299b (patch) | |
tree | c4d95289187a64e9c7517bf73d8208026c3d2fb3 /gl/m4/sockpfaf.m4 | |
parent | 5f79e3e9f62ca5487d9881973149136ba1d19d3e (diff) | |
download | monitoring-plugins-26fbe7f1e68bb0c96da32491efcf3696fe6c299b.tar.gz |
Sync with the latest Gnulib code (6f2d632)
Diffstat (limited to 'gl/m4/sockpfaf.m4')
-rw-r--r-- | gl/m4/sockpfaf.m4 | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4 index 8806705a..89557b18 100644 --- a/gl/m4/sockpfaf.m4 +++ b/gl/m4/sockpfaf.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # sockpfaf.m4 serial 7 | 1 | # sockpfaf.m4 serial 8 |
2 | dnl Copyright (C) 2004, 2006, 2009, 2010 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2004, 2006, 2009-2013 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -59,3 +59,29 @@ AC_DEFUN([gl_SOCKET_FAMILIES], | |||
59 | AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.]) | 59 | AC_DEFINE([HAVE_IPV6], [1], [Define to 1 if <sys/socket.h> defines AF_INET6.]) |
60 | fi | 60 | fi |
61 | ]) | 61 | ]) |
62 | |||
63 | AC_DEFUN([gl_SOCKET_FAMILY_UNIX], | ||
64 | [ | ||
65 | AC_REQUIRE([gl_HEADER_SYS_SOCKET]) | ||
66 | AC_CHECK_HEADERS_ONCE([sys/un.h]) | ||
67 | |||
68 | AC_MSG_CHECKING([for UNIX domain sockets]) | ||
69 | AC_CACHE_VAL([gl_cv_socket_unix], | ||
70 | [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> | ||
71 | #ifdef HAVE_SYS_SOCKET_H | ||
72 | #include <sys/socket.h> | ||
73 | #endif | ||
74 | #ifdef HAVE_SYS_UN_H | ||
75 | #include <sys/un.h> | ||
76 | #endif | ||
77 | #ifdef HAVE_WINSOCK2_H | ||
78 | #include <winsock2.h> | ||
79 | #endif]], | ||
80 | [[int x = AF_UNIX; struct sockaddr_un y; | ||
81 | if (&x && &y) return 0;]])], | ||
82 | gl_cv_socket_unix=yes, gl_cv_socket_unix=no)]) | ||
83 | AC_MSG_RESULT([$gl_cv_socket_unix]) | ||
84 | if test $gl_cv_socket_unix = yes; then | ||
85 | AC_DEFINE([HAVE_UNIXSOCKET], [1], [Define to 1 if <sys/socket.h> defines AF_UNIX.]) | ||
86 | fi | ||
87 | ]) | ||