diff options
author | Cedric Bail <cedric.bail@free.fr> | 2013-03-10 17:57:23 +0100 |
---|---|---|
committer | Cedric BAIL <cedric.bail@samsung.com> | 2013-03-11 10:34:47 +0900 |
commit | 3fe8098e9c5b5bc2eea171bd5ee2c6de3f0bc5f4 (patch) | |
tree | e4dd43851ed89695243691285cb32ae3f33afa17 | |
parent | c97d05aca29972d8082b825b807c97c429d529bc (diff) |
include some header files conditionally add specific test for fcntl
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 6 | ||||
-rw-r--r-- | m4/efl_check_funcs.m4 | 17 | ||||
-rw-r--r-- | src/lib/ecore/ecore.c | 4 | ||||
-rw-r--r-- | src/lib/ecore/ecore_coroutine.c | 4 | ||||
-rw-r--r-- | src/lib/eet/eet_cipher.c | 4 | ||||
-rw-r--r-- | src/lib/eet/eet_connection.c | 5 | ||||
-rw-r--r-- | src/lib/eet/eet_data.c | 5 | ||||
-rw-r--r-- | src/lib/eet/eet_image.c | 5 | ||||
-rw-r--r-- | src/lib/eet/eet_lib.c | 5 | ||||
-rw-r--r-- | src/modules/evas/loaders/psd/evas_image_load_psd.c | 5 |
10 files changed, 50 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index b50957c6c8..bc0ea2c484 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -313,6 +313,7 @@ sys/signalfd.h \ | |||
313 | sys/types.h \ | 313 | sys/types.h \ |
314 | sys/param.h \ | 314 | sys/param.h \ |
315 | sys/mman.h \ | 315 | sys/mman.h \ |
316 | netinet/in.h \ | ||
316 | ]) | 317 | ]) |
317 | 318 | ||
318 | have_inotify="${ac_cv_header_sys_inotify_h}" | 319 | have_inotify="${ac_cv_header_sys_inotify_h}" |
@@ -478,12 +479,11 @@ mkdirat \ | |||
478 | mtrace \ | 479 | mtrace \ |
479 | realpath \ | 480 | realpath \ |
480 | strlcpy \ | 481 | strlcpy \ |
481 | fcntl \ | ||
482 | ]) | 482 | ]) |
483 | 483 | ||
484 | AC_FUNC_ALLOCA | 484 | AC_FUNC_ALLOCA |
485 | 485 | ||
486 | EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday dirfd]) | 486 | EFL_CHECK_FUNCS([EFL], [fnmatch gettimeofday dirfd fcntl]) |
487 | 487 | ||
488 | have_atfile_source="${ac_cv_func_fstatat}" | 488 | have_atfile_source="${ac_cv_func_fstatat}" |
489 | AC_DEFINE_IF([HAVE_ATFILE_SOURCE], | 489 | AC_DEFINE_IF([HAVE_ATFILE_SOURCE], |
@@ -1776,8 +1776,10 @@ EFL_EVAL_PKGS([ECORE]) | |||
1776 | AC_HEADER_SYS_WAIT | 1776 | AC_HEADER_SYS_WAIT |
1777 | 1777 | ||
1778 | AC_CHECK_HEADERS([ \ | 1778 | AC_CHECK_HEADERS([ \ |
1779 | langinfo.h \ | ||
1779 | features.h \ | 1780 | features.h \ |
1780 | sys/prctl.h \ | 1781 | sys/prctl.h \ |
1782 | sys/resource.h \ | ||
1781 | sys/timerfd.h \ | 1783 | sys/timerfd.h \ |
1782 | ]) | 1784 | ]) |
1783 | 1785 | ||
diff --git a/m4/efl_check_funcs.m4 b/m4/efl_check_funcs.m4 index 59a38f7894..b976caa0e8 100644 --- a/m4/efl_check_funcs.m4 +++ b/m4/efl_check_funcs.m4 | |||
@@ -6,6 +6,7 @@ dnl Macros that check functions availability for the EFL: | |||
6 | dnl dirfd | 6 | dnl dirfd |
7 | dnl dladdr | 7 | dnl dladdr |
8 | dnl dlopen | 8 | dnl dlopen |
9 | dnl fcntl | ||
9 | dnl fnmatch | 10 | dnl fnmatch |
10 | dnl gettimeofday | 11 | dnl gettimeofday |
11 | dnl iconv | 12 | dnl iconv |
@@ -114,6 +115,22 @@ case "$host_os" in | |||
114 | esac | 115 | esac |
115 | ]) | 116 | ]) |
116 | 117 | ||
118 | dnl _EFL_CHECK_FUNC_FCNTL is for internal use | ||
119 | dnl _EFL_CHECK_FUNC_FCNTL(EFL, VARIABLE) | ||
120 | AC_DEFUN([_EFL_CHECK_FUNC_FCNTL], | ||
121 | [ | ||
122 | case "$host_os" in | ||
123 | mingw*) | ||
124 | $2="yes" | ||
125 | ;; | ||
126 | *) | ||
127 | EFL_FIND_LIB_FOR_CODE([$1], [], [$2], [[ | ||
128 | #include <fcntl.h> | ||
129 | ]], [[int g = fcntl(0, 0);]]) | ||
130 | ;; | ||
131 | esac | ||
132 | ]) | ||
133 | |||
117 | dnl _EFL_CHECK_FUNC_FNMATCH is for internal use | 134 | dnl _EFL_CHECK_FUNC_FNMATCH is for internal use |
118 | dnl _EFL_CHECK_FUNC_FNMATCH(EFL, VARIABLE) | 135 | dnl _EFL_CHECK_FUNC_FNMATCH(EFL, VARIABLE) |
119 | AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH], | 136 | AC_DEFUN([_EFL_CHECK_FUNC_FNMATCH], |
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index 3c5a1019a0..237b457b92 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c | |||
@@ -11,7 +11,9 @@ | |||
11 | #include <fcntl.h> | 11 | #include <fcntl.h> |
12 | #include <errno.h> | 12 | #include <errno.h> |
13 | 13 | ||
14 | #include <langinfo.h> | 14 | #ifdef HAVE_LANGINFO_H |
15 | # include <langinfo.h> | ||
16 | #endif | ||
15 | 17 | ||
16 | #ifdef HAVE_SYS_MMAN_H | 18 | #ifdef HAVE_SYS_MMAN_H |
17 | # include <sys/mman.h> | 19 | # include <sys/mman.h> |
diff --git a/src/lib/ecore/ecore_coroutine.c b/src/lib/ecore/ecore_coroutine.c index 5afd20e112..6f28584a0c 100644 --- a/src/lib/ecore/ecore_coroutine.c +++ b/src/lib/ecore/ecore_coroutine.c | |||
@@ -14,7 +14,9 @@ | |||
14 | # include <ucontext.h> | 14 | # include <ucontext.h> |
15 | #elif defined(USE_SETJMP) | 15 | #elif defined(USE_SETJMP) |
16 | # include <sys/time.h> | 16 | # include <sys/time.h> |
17 | # include <sys/resource.h> | 17 | # if HAVE_SYS_RESOURCE_H |
18 | # include <sys/resource.h> | ||
19 | # endif | ||
18 | # include <setjmp.h> | 20 | # include <setjmp.h> |
19 | #endif | 21 | #endif |
20 | 22 | ||
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c index 270e957ac7..f805ba7c0b 100644 --- a/src/lib/eet/eet_cipher.c +++ b/src/lib/eet/eet_cipher.c | |||
@@ -8,7 +8,9 @@ | |||
8 | #include <sys/stat.h> | 8 | #include <sys/stat.h> |
9 | #include <unistd.h> | 9 | #include <unistd.h> |
10 | 10 | ||
11 | #include <netinet/in.h> | 11 | #ifdef HAVE_NETINET_IN_H |
12 | # include <netinet/in.h> | ||
13 | #endif | ||
12 | 14 | ||
13 | #ifdef HAVE_SIGNATURE | 15 | #ifdef HAVE_SIGNATURE |
14 | # include <sys/mman.h> | 16 | # include <sys/mman.h> |
diff --git a/src/lib/eet/eet_connection.c b/src/lib/eet/eet_connection.c index 21e9c1c931..7945692aaa 100644 --- a/src/lib/eet/eet_connection.c +++ b/src/lib/eet/eet_connection.c | |||
@@ -4,7 +4,10 @@ | |||
4 | 4 | ||
5 | #include <string.h> | 5 | #include <string.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <netinet/in.h> | 7 | |
8 | #ifdef HAVE_NETINET_IN_H | ||
9 | # include <netinet/in.h> | ||
10 | #endif | ||
8 | 11 | ||
9 | #ifdef _WIN32 | 12 | #ifdef _WIN32 |
10 | # include <winsock2.h> | 13 | # include <winsock2.h> |
diff --git a/src/lib/eet/eet_data.c b/src/lib/eet/eet_data.c index fa64246e38..e2001c0254 100644 --- a/src/lib/eet/eet_data.c +++ b/src/lib/eet/eet_data.c | |||
@@ -7,7 +7,10 @@ | |||
7 | #include <math.h> | 7 | #include <math.h> |
8 | #include <ctype.h> | 8 | #include <ctype.h> |
9 | #include <limits.h> | 9 | #include <limits.h> |
10 | #include <netinet/in.h> | 10 | |
11 | #ifdef HAVE_NETINET_IN_H | ||
12 | # include <netinet/in.h> | ||
13 | #endif | ||
11 | 14 | ||
12 | #ifdef _WIN32 | 15 | #ifdef _WIN32 |
13 | # include <winsock2.h> | 16 | # include <winsock2.h> |
diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c index 95f2a47c04..07fb1a72ac 100644 --- a/src/lib/eet/eet_image.c +++ b/src/lib/eet/eet_image.c | |||
@@ -5,7 +5,10 @@ | |||
5 | #ifdef __OpenBSD__ | 5 | #ifdef __OpenBSD__ |
6 | # include <sys/types.h> | 6 | # include <sys/types.h> |
7 | #endif /* ifdef __OpenBSD__ */ | 7 | #endif /* ifdef __OpenBSD__ */ |
8 | #include <netinet/in.h> | 8 | |
9 | #ifdef HAVE_NETINET_IN_H | ||
10 | # include <netinet/in.h> | ||
11 | #endif | ||
9 | 12 | ||
10 | #ifdef _WIN32 | 13 | #ifdef _WIN32 |
11 | # include <winsock2.h> | 14 | # include <winsock2.h> |
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c index 6485eebcc2..cbe7da4ebc 100644 --- a/src/lib/eet/eet_lib.c +++ b/src/lib/eet/eet_lib.c | |||
@@ -16,7 +16,10 @@ | |||
16 | #include <fnmatch.h> | 16 | #include <fnmatch.h> |
17 | #include <fcntl.h> | 17 | #include <fcntl.h> |
18 | #include <zlib.h> | 18 | #include <zlib.h> |
19 | #include <netinet/in.h> | 19 | |
20 | #ifdef HAVE_NETINET_IN_H | ||
21 | # include <netinet/in.h> | ||
22 | #endif | ||
20 | 23 | ||
21 | #ifdef HAVE_EVIL | 24 | #ifdef HAVE_EVIL |
22 | # include <Evil.h> | 25 | # include <Evil.h> |
diff --git a/src/modules/evas/loaders/psd/evas_image_load_psd.c b/src/modules/evas/loaders/psd/evas_image_load_psd.c index d15e7922f4..711298e9b1 100644 --- a/src/modules/evas/loaders/psd/evas_image_load_psd.c +++ b/src/modules/evas/loaders/psd/evas_image_load_psd.c | |||
@@ -14,7 +14,10 @@ | |||
14 | #include <sys/stat.h> | 14 | #include <sys/stat.h> |
15 | #include <unistd.h> | 15 | #include <unistd.h> |
16 | #include <fcntl.h> | 16 | #include <fcntl.h> |
17 | #include <netinet/in.h> | 17 | |
18 | #ifdef HAVE_NETINET_IN_H | ||
19 | # include <netinet/in.h> | ||
20 | #endif | ||
18 | 21 | ||
19 | #ifdef HAVE_EVIL | 22 | #ifdef HAVE_EVIL |
20 | # include <Evil.h> | 23 | # include <Evil.h> |