git.samba.org
/
jra
/
samba
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
90f3da4
)
Fix realpath() check so that it doesn't generate a core() when it fails.
author
Zach Loafman
<zachary.loafman@isilon.com>
Thu, 10 Jul 2008 18:45:48 +0000
(18:45 +0000)
committer
Jeremy Allison
<jra@samba.org>
Thu, 10 Jul 2008 22:24:57 +0000
(15:24 -0700)
(This used to be commit
5fdbf89c898efff57c65061ea2c360d2cd91bcec
)
source3/configure.in
patch
|
blob
|
history
diff --git
a/source3/configure.in
b/source3/configure.in
index fc66c17425c6a857d9b6dcfc14a951e4d0b5c144..2ae5e35295d604d02ac860fe7e1b71fcdf4d899f 100644
(file)
--- a/
source3/configure.in
+++ b/
source3/configure.in
@@
-2795,9
+2795,17
@@
AC_CACHE_CHECK([if the realpath function allows a NULL argument],samba_cv_REALPA
AC_TRY_RUN([
#include <stdio.h>
#include <limits.h>
+#include <signal.h>
+
+void exit_on_core(int ignored) {
+ exit(1);
+}
+
main() {
- char *newpath = realpath("/tmp", NULL);
- exit ((newpath != NULL) ? 0 : 1);
+ char *newpath;
+ signal(SIGSEGV, exit_on_core);
+ newpath = realpath("/tmp", NULL);
+ exit((newpath != NULL) ? 0 : 1);
}
],
samba_cv_REALPATH_TAKES_NULL=yes,samba_cv_REALPATH_TAKES_NULL=no,samba_cv_REALPATH_TAKES_NULL=cross)])