This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  9b67b36276e6a6db567d24c7f3c76e3769276b89 (commit)
      from  e1146e56e08af2a66aecedffc6ff31d8ddcb25f3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/9b67b36276e6a6db567d24c7f3c76e3769276b89

commit 9b67b36276e6a6db567d24c7f3c76e3769276b89
Author: Christophe CURIS <christophe.cu...@free.fr>
Date:   Wed Dec 17 17:54:38 2014 +0100

    configure: add detection for O_NOFOLLOW flag to the open function
    
    As discovered by Douglas Torrance, this flag is not really portable, so
    this patch adds a check in the configure script to detect if any known
    define could help. If no value works, we fall back to defining it with the
    neutral value '0', so the compilation will not fail.
    
    Signed-off-by: Christophe CURIS <christophe.cu...@free.fr>

diff --git a/configure.ac b/configure.ac
index ad4bef61..f98b6f79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,6 +317,9 @@ dnl case. One known example is Solaris which needs -lrt
 AC_SEARCH_LIBS([nanosleep], [rt], [],
     [AC_MSG_ERROR([function 'nanosleep' not found, please report to 
wmaker-dev@lists.windowmaker.org])])
 
+dnl the flag 'O_NOFOLLOW' for 'open' is used in WINGs
+WM_FUNC_OPEN_NOFOLLOW
+
 
 dnl Check for strlcat/strlcpy
 dnl =========================
diff --git a/m4/windowmaker.m4 b/m4/windowmaker.m4
index affdea47..e59f7fa5 100644
--- a/m4/windowmaker.m4
+++ b/m4/windowmaker.m4
@@ -207,3 +207,40 @@ AS_IF([test "x$wm_cv_func_secure_getenv" != "xno"],
      AC_DEFINE([HAVE_SECURE_GETENV], [1],
          [defined when GNU's secure_getenv function is available])])
 ])
+
+
+# WM_FUNC_OPEN_NOFOLLOW
+# ---------------------
+#
+# Check if the flag 'O_NOFOLLOW' is supported, for the function 'open'
+AC_DEFUN_ONCE([WM_FUNC_OPEN_NOFOLLOW],
+[AC_CACHE_CHECK([for O_NOFOLLOW], [wm_cv_func_open_nofollow],
+    [wm_cv_func_open_nofollow=no
+     wm_save_CPPFLAGS="$CPPFLAGS"
+     for wm_arg in dnl
+"yes"  dnl natively supported, nothing to do
+"-D_POSIX_C_SOURCE=200809L"  dnl the flag was officially added in POSIX.1-2008
+"-D_XOPEN_SOURCE=700"  dnl for recent glibc
+"-D_GNU_SOURCE"  dnl for older glibc
+     ; do
+         AS_IF([test "x$wm_arg" != "xyes"], [CPPFLAGS="$wm_save_CPPFLAGS 
$wm_arg"])
+         AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
+@%:@include <sys/types.h>
+@%:@include <sys/stat.h>
+@%:@include <fcntl.h>], [dnl
+  int fd;
+
+  fd = open("/dev/null", O_RDONLY | O_NOFOLLOW);
+  return fd;])], [found=1], [found=0])
+         AS_IF([test $found = 1],
+             [wm_cv_func_open_nofollow="$wm_arg"
+              break])
+     done
+     CPPFLAGS="$wm_save_CPPFLAGS"])
+AS_CASE([$wm_cv_func_open_nofollow],
+    [yes], [],
+    [no],  [AC_DEFINE([O_NOFOLLOW], [0],
+                [defined by configure if the attribute is not defined on your 
platform])
+            AC_MSG_WARN([flag O_NOFOLLOW is not defined on your platform])],
+    [CPPFLAGS="$CPPFLAGS $wm_cv_func_open_nofollow"])
+])

-----------------------------------------------------------------------

Summary of changes:
 configure.ac      |    3 +++
 m4/windowmaker.m4 |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 0 deletions(-)


repo.or.cz automatic notification. Contact project admin crma...@gmail.com
if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to