projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Lots of compiler fixes.
[m6w6/libmemcached]
/
m4
/
setsockopt.m4
diff --git
a/m4/setsockopt.m4
b/m4/setsockopt.m4
index 4ca7214cff9595dd1d6c1342f5b1e8809e3b2881..e37fe2ae7c0e9b0df3e3d2081af6dc1bea628ca7 100644
(file)
--- a/
m4/setsockopt.m4
+++ b/
m4/setsockopt.m4
@@
-1,15
+1,16
@@
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
-dnl Macro: SETSOCKOPT_
TEST
+dnl Macro: SETSOCKOPT_
SANITY
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
-AC_LANG(C)
-AC_RUN_IFELSE([
- AC_LANG_PROGRAM([
+AC_DEFUN([SETSOCKOPT_SANITY],[
+ AC_LANG_PUSH([C])
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
#include <sys/types.h>
#include <sys/socket.h>
#include <time.h>
#include <sys/time.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <time.h>
#include <sys/time.h>
#include <errno.h>
- ]
,
[
+ ]
],[
[
int sock = socket(AF_INET, SOCK_STREAM, 0);
struct timeval waittime;
int sock = socket(AF_INET, SOCK_STREAM, 0);
struct timeval waittime;
@@
-23,17
+24,17
@@
AC_RUN_IFELSE([
}
}
return 0;
}
}
return 0;
- ]
)
-
], AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO])
)
+ ]
])],
+
[AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working SO_SNDTIMEO])]
)
-AC_RUN_IFELSE([
-
AC_LANG_PROGRAM(
[
+
AC_RUN_IFELSE([
+
AC_LANG_PROGRAM([
[
#include <sys/types.h>
#include <sys/socket.h>
#include <time.h>
#include <sys/time.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <time.h>
#include <sys/time.h>
#include <errno.h>
-
],
[
+
]],[
[
int sock = socket(AF_INET, SOCK_STREAM, 0);
struct timeval waittime;
int sock = socket(AF_INET, SOCK_STREAM, 0);
struct timeval waittime;
@@
-47,9
+48,10
@@
AC_RUN_IFELSE([
}
}
return 0;
}
}
return 0;
- ])
- ], AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO]))
+ ]])], [AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working SO_RCVTIMEO])])
+ AC_LANG_POP
+])
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------
-dnl End Macro: SETSOCKOPT_
TEST
+dnl End Macro: SETSOCKOPT_
SANITY
dnl ---------------------------------------------------------------------------
dnl ---------------------------------------------------------------------------