help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] [PATCH 2/3] libgst: Fix the cint.c build on XNU/Darwin


From: Holger Hans Peter Freyther
Subject: [Help-smalltalk] [PATCH 2/3] libgst: Fix the cint.c build on XNU/Darwin
Date: Sun, 2 Aug 2015 16:42:16 +0200

fdatasync appears to be available when linking but there is
no declaration in XNU. Move from checking the function to
checking the declaration.

Fixes:

cint.c:663:35: error: use of undeclared identifier 'fdatasync'
  _gst_define_cfunc ("fdatasync", fdatasync);
                                  ^

2015-05-21  Holger Hans Peter Freyther  <address@hidden>

        * configure.ac: Move from AC_CHECK_FUNCS_ONCE to AC_CHECK_DECLS
        for fdatasync.

2015-05-21  Holger Hans Peter Freyther  <address@hidden>

        * cint.c: Change to use #if instead of #ifdef and update
        the macro to change for.
---
 ChangeLog        | 5 +++++
 configure.ac     | 3 ++-
 libgst/ChangeLog | 5 +++++
 libgst/cint.c    | 2 +-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b88cfe7..2875294 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-21  Holger Hans Peter Freyther  <address@hidden>
+
+       * configure.ac: Move from AC_CHECK_FUNCS_ONCE to AC_CHECK_DECLS
+       for fdatasync.
+
 2015-01-25  Holger Hans Peter Freyther  <address@hidden>
 
        * scripts/Remote.st: Document -I and --no-line-numbers.
diff --git a/configure.ac b/configure.ac
index bfd09a4..2102214 100644
--- a/configure.ac
+++ b/configure.ac
@@ -359,7 +359,7 @@ AC_REPLACE_FUNCS(putenv strdup strerror strsignal mkstemp 
getpagesize \
         lrint trunc strsep strpbrk symlink mkdtemp)
 AC_CHECK_FUNCS_ONCE(gethostname memcpy memmove sighold uname usleep lstat \
        grantpt popen getrusage gettimeofday fork strchr utimes utime readlink \
-       sigsetmask alarm select mprotect madvise waitpid accept4 fdatasync \
+       sigsetmask alarm select mprotect madvise waitpid accept4 \
        setsid spawnl pread pwrite _NSGetExecutablePath _NSGetEnviron \
        chown getgrnam getpwnam endgrent endpwent setgroupent setpassent)
 
@@ -371,6 +371,7 @@ fi
 
 dnl FreeBSD does provide an environ but it is not declared in the headers
 AC_CHECK_DECLS([environ])
+AC_CHECK_DECLS([fdatasync], [], [], [[#include <unistd.h>]])
 
 AC_SEARCH_LIBS([nanosleep], [rt])
 if test "$ac_cv_search_nanosleep" != no; then
diff --git a/libgst/ChangeLog b/libgst/ChangeLog
index 6724338..cc0fdb1 100644
--- a/libgst/ChangeLog
+++ b/libgst/ChangeLog
@@ -1,3 +1,8 @@
+2015-05-21  Holger Hans Peter Freyther  <address@hidden>
+
+       * cint.c: Change to use #if instead of #ifdef and update
+       the macro to change for.
+
 2015-04-17  Holger Hans Peter Freyther  <address@hidden>
 
        * sysdep/posix/timer.c: Fix handling small sleeping
diff --git a/libgst/cint.c b/libgst/cint.c
index 510cc46..fdb6ce3 100644
--- a/libgst/cint.c
+++ b/libgst/cint.c
@@ -659,7 +659,7 @@ _gst_init_cfuncs (void)
   _gst_define_cfunc ("mkdtemp", my_mkdtemp);
   _gst_define_cfunc ("getCurDirName", _gst_get_cur_dir_name);
   _gst_define_cfunc ("fsync", fsync);
-#ifdef HAVE_FDATASYNC
+#if HAVE_DECL_FDATASYNC
   _gst_define_cfunc ("fdatasync", fdatasync);
 #else
   _gst_define_cfunc ("fdatasync", fsync);
-- 
2.3.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]