diff options
48 files changed, 70 insertions, 560 deletions
@@ -1,3 +1,7 @@ | |||
1 | 2013-01-03 Gustavo Sverzut Barbieri (k-s) | ||
2 | |||
3 | * Add eina_alloc.h to Eina.h to define alloca() | ||
4 | |||
1 | 2013-01-03 Cedric Bail | 5 | 2013-01-03 Cedric Bail |
2 | 6 | ||
3 | * Use Eina_File for evas png loader. | 7 | * Use Eina_File for evas png loader. |
@@ -71,6 +71,7 @@ Improvements: | |||
71 | * eina_magic_fail() now throws error messages on NULL pointers instead of critical | 71 | * eina_magic_fail() now throws error messages on NULL pointers instead of critical |
72 | * all efl object-freeing functions now take NULL without crashing or erroring | 72 | * all efl object-freeing functions now take NULL without crashing or erroring |
73 | * use Eina_File in webp, gif, tiff, png and eet loader | 73 | * use Eina_File in webp, gif, tiff, png and eet loader |
74 | * Eina.h includes eina_alloca.h/alloca.h to define alloca() | ||
74 | 75 | ||
75 | Fixes: | 76 | Fixes: |
76 | * Fix PPC (big endian) image codec bug. | 77 | * Fix PPC (big endian) image codec bug. |
diff --git a/configure.ac b/configure.ac index d5b0ee1cc1..8206881a9d 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -732,6 +732,7 @@ case "${build_profile}" in | |||
732 | ;; | 732 | ;; |
733 | esac | 733 | esac |
734 | 734 | ||
735 | EINA_CONFIG([HAVE_ALLOCA_H], [test "x${ac_cv_working_alloca_h}" = "xyes"]) | ||
735 | EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"]) | 736 | EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"]) |
736 | EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"]) | 737 | EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"]) |
737 | EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"]) | 738 | EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"]) |
diff --git a/src/Makefile_Eina.am b/src/Makefile_Eina.am index 4b87f33ba6..661949223c 100644 --- a/src/Makefile_Eina.am +++ b/src/Makefile_Eina.am | |||
@@ -76,7 +76,8 @@ lib/eina/eina_xattr.h \ | |||
76 | lib/eina/eina_value.h \ | 76 | lib/eina/eina_value.h \ |
77 | lib/eina/eina_inline_value.x \ | 77 | lib/eina/eina_inline_value.x \ |
78 | lib/eina/eina_inline_lock_barrier.x \ | 78 | lib/eina/eina_inline_lock_barrier.x \ |
79 | lib/eina/eina_tmpstr.h | 79 | lib/eina/eina_tmpstr.h \ |
80 | lib/eina/eina_alloca.h | ||
80 | 81 | ||
81 | # Will be back for developper after 1.2. | 82 | # Will be back for developper after 1.2. |
82 | # lib/eina/eina_model.h | 83 | # lib/eina/eina_model.h |
diff --git a/src/bin/efreet/efreet_icon_cache_create.c b/src/bin/efreet/efreet_icon_cache_create.c index 662dd09469..a4f774ca8f 100644 --- a/src/bin/efreet/efreet_icon_cache_create.c +++ b/src/bin/efreet/efreet_icon_cache_create.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <sys/stat.h> | 5 | #include <sys/stat.h> |
8 | #include <fcntl.h> | 6 | #include <fcntl.h> |
9 | #include <unistd.h> | 7 | #include <unistd.h> |
diff --git a/src/lib/ecore/ecore_getopt.c b/src/lib/ecore/ecore_getopt.c index f31f7c2290..bbc5b82f8a 100644 --- a/src/lib/ecore/ecore_getopt.c +++ b/src/lib/ecore/ecore_getopt.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <stdlib.h> | 14 | #include <stdlib.h> |
32 | #include <stdio.h> | 15 | #include <stdio.h> |
diff --git a/src/lib/ecore_con/ecore_con_eet.c b/src/lib/ecore_con/ecore_con_eet.c index f3948ca5f8..d146dd6136 100644 --- a/src/lib/ecore_con/ecore_con_eet.c +++ b/src/lib/ecore_con/ecore_con_eet.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <Eina.h> | 14 | #include <Eina.h> |
32 | 15 | ||
diff --git a/src/lib/ecore_con/ecore_con_info.c b/src/lib/ecore_con/ecore_con_info.c index 648ca218ac..d03e9ccd61 100644 --- a/src/lib/ecore_con/ecore_con_info.c +++ b/src/lib/ecore_con/ecore_con_info.c | |||
@@ -17,23 +17,6 @@ | |||
17 | # include <stdlib.h> | 17 | # include <stdlib.h> |
18 | # endif | 18 | # endif |
19 | #endif | 19 | #endif |
20 | #ifdef HAVE_ALLOCA_H | ||
21 | # include <alloca.h> | ||
22 | #elif !defined alloca | ||
23 | # ifdef __GNUC__ | ||
24 | # define alloca __builtin_alloca | ||
25 | # elif defined _AIX | ||
26 | # define alloca __alloca | ||
27 | # elif defined _MSC_VER | ||
28 | # include <malloc.h> | ||
29 | # define alloca _alloca | ||
30 | # elif !defined HAVE_ALLOCA | ||
31 | # ifdef __cplusplus | ||
32 | extern "C" | ||
33 | # endif | ||
34 | void *alloca (size_t); | ||
35 | # endif | ||
36 | #endif | ||
37 | 20 | ||
38 | #include <string.h> | 21 | #include <string.h> |
39 | #include <sys/types.h> | 22 | #include <sys/types.h> |
diff --git a/src/lib/ecore_con/ecore_con_ssl.c b/src/lib/ecore_con/ecore_con_ssl.c index 93fbd6672a..be73968cca 100644 --- a/src/lib/ecore_con/ecore_con_ssl.c +++ b/src/lib/ecore_con/ecore_con_ssl.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #if HAVE_GNUTLS | 14 | #if HAVE_GNUTLS |
32 | # include <gnutls/gnutls.h> | 15 | # include <gnutls/gnutls.h> |
diff --git a/src/lib/ecore_file/ecore_file_path.c b/src/lib/ecore_file/ecore_file_path.c index c1c54b7c0f..a368cf35fb 100644 --- a/src/lib/ecore_file/ecore_file_path.c +++ b/src/lib/ecore_file/ecore_file_path.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <stdlib.h> | 14 | #include <stdlib.h> |
32 | #include <stdio.h> | 15 | #include <stdio.h> |
diff --git a/src/lib/ecore_x/xcb/ecore_xcb_private.h b/src/lib/ecore_x/xcb/ecore_xcb_private.h index 240210ca0d..d40fa3b4aa 100644 --- a/src/lib/ecore_x/xcb/ecore_xcb_private.h +++ b/src/lib/ecore_x/xcb/ecore_xcb_private.h | |||
@@ -15,23 +15,6 @@ | |||
15 | # include <stdlib.h> | 15 | # include <stdlib.h> |
16 | # endif | 16 | # endif |
17 | #endif | 17 | #endif |
18 | #ifdef HAVE_ALLOCA_H | ||
19 | # include <alloca.h> | ||
20 | #elif !defined alloca | ||
21 | # ifdef __GNUC__ | ||
22 | # define alloca __builtin_alloca | ||
23 | # elif defined _AIX | ||
24 | # define alloca __alloca | ||
25 | # elif defined _MSC_VER | ||
26 | # include <malloc.h> | ||
27 | # define alloca _alloca | ||
28 | # elif !defined HAVE_ALLOCA | ||
29 | # ifdef __cplusplus | ||
30 | extern "C" | ||
31 | # endif | ||
32 | void *alloca (size_t); | ||
33 | # endif | ||
34 | #endif | ||
35 | 18 | ||
36 | # include <unistd.h> // included for close & gethostname functions | 19 | # include <unistd.h> // included for close & gethostname functions |
37 | 20 | ||
diff --git a/src/lib/ecore_x/xlib/ecore_x.c b/src/lib/ecore_x/xlib/ecore_x.c index b6998cd332..ef693fd5a6 100644 --- a/src/lib/ecore_x/xlib/ecore_x.c +++ b/src/lib/ecore_x/xlib/ecore_x.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <stdlib.h> | 14 | #include <stdlib.h> |
32 | #include <string.h> | 15 | #include <string.h> |
diff --git a/src/lib/ecore_x/xlib/ecore_x_atoms.c b/src/lib/ecore_x/xlib/ecore_x_atoms.c index 2aec7ce740..93cd9eb540 100644 --- a/src/lib/ecore_x/xlib/ecore_x_atoms.c +++ b/src/lib/ecore_x/xlib/ecore_x_atoms.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <string.h> | 14 | #include <string.h> |
32 | 15 | ||
diff --git a/src/lib/ecore_x/xlib/ecore_x_e.c b/src/lib/ecore_x/xlib/ecore_x_e.c index 586a972e08..63dee9cf4f 100644 --- a/src/lib/ecore_x/xlib/ecore_x_e.c +++ b/src/lib/ecore_x/xlib/ecore_x_e.c | |||
@@ -14,23 +14,6 @@ | |||
14 | # include <stdlib.h> | 14 | # include <stdlib.h> |
15 | # endif | 15 | # endif |
16 | #endif | 16 | #endif |
17 | #ifdef HAVE_ALLOCA_H | ||
18 | # include <alloca.h> | ||
19 | #elif !defined alloca | ||
20 | # ifdef __GNUC__ | ||
21 | # define alloca __builtin_alloca | ||
22 | # elif defined _AIX | ||
23 | # define alloca __alloca | ||
24 | # elif defined _MSC_VER | ||
25 | # include <malloc.h> | ||
26 | # define alloca _alloca | ||
27 | # elif !defined HAVE_ALLOCA | ||
28 | # ifdef __cplusplus | ||
29 | extern "C" | ||
30 | # endif | ||
31 | void *alloca (size_t); | ||
32 | # endif | ||
33 | #endif | ||
34 | 17 | ||
35 | #include "Ecore.h" | 18 | #include "Ecore.h" |
36 | #include "ecore_x_private.h" | 19 | #include "ecore_x_private.h" |
diff --git a/src/lib/ecore_x/xlib/ecore_x_image.c b/src/lib/ecore_x/xlib/ecore_x_image.c index ec1c1b8412..e8319b9370 100644 --- a/src/lib/ecore_x/xlib/ecore_x_image.c +++ b/src/lib/ecore_x/xlib/ecore_x_image.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <stdlib.h> | 14 | #include <stdlib.h> |
32 | #include <string.h> | 15 | #include <string.h> |
diff --git a/src/lib/ecore_x/xlib/ecore_x_randr_12.c b/src/lib/ecore_x/xlib/ecore_x_randr_12.c index 9e937d7bf7..8858f76238 100644 --- a/src/lib/ecore_x/xlib/ecore_x_randr_12.c +++ b/src/lib/ecore_x/xlib/ecore_x_randr_12.c | |||
@@ -14,23 +14,6 @@ | |||
14 | # include <stdlib.h> | 14 | # include <stdlib.h> |
15 | # endif | 15 | # endif |
16 | #endif | 16 | #endif |
17 | #ifdef HAVE_ALLOCA_H | ||
18 | # include <alloca.h> | ||
19 | #elif !defined alloca | ||
20 | # ifdef __GNUC__ | ||
21 | # define alloca __builtin_alloca | ||
22 | # elif defined _AIX | ||
23 | # define alloca __alloca | ||
24 | # elif defined _MSC_VER | ||
25 | # include <malloc.h> | ||
26 | # define alloca _alloca | ||
27 | # elif !defined HAVE_ALLOCA | ||
28 | # ifdef __cplusplus | ||
29 | extern "C" | ||
30 | # endif | ||
31 | void *alloca (size_t); | ||
32 | # endif | ||
33 | #endif | ||
34 | 17 | ||
35 | #include "ecore_x_private.h" | 18 | #include "ecore_x_private.h" |
36 | #include "ecore_x_randr.h" | 19 | #include "ecore_x_randr.h" |
diff --git a/src/lib/ecore_x/xlib/ecore_x_selection.c b/src/lib/ecore_x/xlib/ecore_x_selection.c index 3e1d2d34a2..269ea342ed 100644 --- a/src/lib/ecore_x/xlib/ecore_x_selection.c +++ b/src/lib/ecore_x/xlib/ecore_x_selection.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <stdlib.h> | 14 | #include <stdlib.h> |
32 | #include <string.h> | 15 | #include <string.h> |
diff --git a/src/lib/eet/eet_cipher.c b/src/lib/eet/eet_cipher.c index f61b1009d7..60105acde4 100644 --- a/src/lib/eet/eet_cipher.c +++ b/src/lib/eet/eet_cipher.c | |||
@@ -2,23 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif /* ifdef HAVE_CONFIG_H */ | 3 | #endif /* ifdef HAVE_CONFIG_H */ |
4 | 4 | ||
5 | #ifdef HAVE_ALLOCA_H | ||
6 | # include <alloca.h> | ||
7 | #elif defined __GNUC__ | ||
8 | # define alloca __builtin_alloca | ||
9 | #elif defined _AIX | ||
10 | # define alloca __alloca | ||
11 | #elif defined _MSC_VER | ||
12 | # include <malloc.h> | ||
13 | # define alloca _alloca | ||
14 | #else /* ifdef HAVE_ALLOCA_H */ | ||
15 | # include <stddef.h> | ||
16 | # ifdef __cplusplus | ||
17 | extern "C" | ||
18 | # endif /* ifdef __cplusplus */ | ||
19 | void *alloca(size_t); | ||
20 | #endif /* ifdef HAVE_ALLOCA_H */ | ||
21 | |||
22 | #include <stdio.h> | 5 | #include <stdio.h> |
23 | #include <string.h> | 6 | #include <string.h> |
24 | #include <sys/types.h> | 7 | #include <sys/types.h> |
diff --git a/src/lib/eet/eet_connection.c b/src/lib/eet/eet_connection.c index 61c5f8d84a..bde6ff13be 100644 --- a/src/lib/eet/eet_connection.c +++ b/src/lib/eet/eet_connection.c | |||
@@ -2,23 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif /* ifdef HAVE_CONFIG_H */ | 3 | #endif /* ifdef HAVE_CONFIG_H */ |
4 | 4 | ||
5 | #ifdef HAVE_ALLOCA_H | ||
6 | # include <alloca.h> | ||
7 | #elif defined __GNUC__ | ||
8 | # define alloca __builtin_alloca | ||
9 | #elif defined _AIX | ||
10 | # define alloca __alloca | ||
11 | #elif defined _MSC_VER | ||
12 | # include <malloc.h> | ||
13 | # define alloca _alloca | ||
14 | #else /* ifdef HAVE_ALLOCA_H */ | ||
15 | # include <stddef.h> | ||
16 | # ifdef __cplusplus | ||
17 | extern "C" | ||
18 | # endif /* ifdef __cplusplus */ | ||
19 | void *alloca(size_t); | ||
20 | #endif /* ifdef HAVE_ALLOCA_H */ | ||
21 | |||
22 | #include <string.h> | 5 | #include <string.h> |
23 | #include <stdlib.h> | 6 | #include <stdlib.h> |
24 | 7 | ||
diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c index 149fa1aa27..f0eb03c9fa 100644 --- a/src/lib/eet/eet_image.c +++ b/src/lib/eet/eet_image.c | |||
@@ -2,23 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif /* ifdef HAVE_CONFIG_H */ | 3 | #endif /* ifdef HAVE_CONFIG_H */ |
4 | 4 | ||
5 | #ifdef HAVE_ALLOCA_H | ||
6 | # include <alloca.h> | ||
7 | #elif defined __GNUC__ | ||
8 | # define alloca __builtin_alloca | ||
9 | #elif defined _AIX | ||
10 | # define alloca __alloca | ||
11 | #elif defined _MSC_VER | ||
12 | # include <malloc.h> | ||
13 | # define alloca _alloca | ||
14 | #else /* ifdef HAVE_ALLOCA_H */ | ||
15 | # include <stddef.h> | ||
16 | # ifdef __cplusplus | ||
17 | extern "C" | ||
18 | # endif /* ifdef __cplusplus */ | ||
19 | void *alloca(size_t); | ||
20 | #endif /* ifdef HAVE_ALLOCA_H */ | ||
21 | |||
22 | #ifdef HAVE_NETINET_IN_H | 5 | #ifdef HAVE_NETINET_IN_H |
23 | # ifdef __OpenBSD__ | 6 | # ifdef __OpenBSD__ |
24 | # include <sys/types.h> | 7 | # include <sys/types.h> |
diff --git a/src/lib/eet/eet_lib.c b/src/lib/eet/eet_lib.c index 45bfc1a4ad..7717fdf9f6 100644 --- a/src/lib/eet/eet_lib.c +++ b/src/lib/eet/eet_lib.c | |||
@@ -2,23 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif /* ifdef HAVE_CONFIG_H */ | 3 | #endif /* ifdef HAVE_CONFIG_H */ |
4 | 4 | ||
5 | #ifdef HAVE_ALLOCA_H | ||
6 | # include <alloca.h> | ||
7 | #elif defined __GNUC__ | ||
8 | # define alloca __builtin_alloca | ||
9 | #elif defined _AIX | ||
10 | # define alloca __alloca | ||
11 | #elif defined _MSC_VER | ||
12 | # include <malloc.h> | ||
13 | # define alloca _alloca | ||
14 | #else /* ifdef HAVE_ALLOCA_H */ | ||
15 | # include <stddef.h> | ||
16 | # ifdef __cplusplus | ||
17 | extern "C" | ||
18 | # endif /* ifdef __cplusplus */ | ||
19 | void *alloca(size_t); | ||
20 | #endif /* ifdef HAVE_ALLOCA_H */ | ||
21 | |||
22 | #ifdef _WIN32 | 5 | #ifdef _WIN32 |
23 | # include <winsock2.h> | 6 | # include <winsock2.h> |
24 | #endif /* ifdef _WIN32 */ | 7 | #endif /* ifdef _WIN32 */ |
diff --git a/src/lib/efreet/efreet.c b/src/lib/efreet/efreet.c index fcc0cfb634..91d093e775 100644 --- a/src/lib/efreet/efreet.c +++ b/src/lib/efreet/efreet.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <unistd.h> | 5 | #include <unistd.h> |
8 | #include <sys/stat.h> | 6 | #include <sys/stat.h> |
9 | #include <fcntl.h> | 7 | #include <fcntl.h> |
diff --git a/src/lib/efreet/efreet_alloca.h b/src/lib/efreet/efreet_alloca.h deleted file mode 100644 index 58a739815e..0000000000 --- a/src/lib/efreet/efreet_alloca.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | #ifndef EFREET_ALLOCA_H | ||
2 | #define EFREET_ALLOCA_H | ||
3 | |||
4 | #ifdef STDC_HEADERS | ||
5 | # include <stdlib.h> | ||
6 | # include <stddef.h> | ||
7 | #else | ||
8 | # ifdef HAVE_STDLIB_H | ||
9 | # include <stdlib.h> | ||
10 | # endif | ||
11 | #endif | ||
12 | #ifdef HAVE_ALLOCA_H | ||
13 | # include <alloca.h> | ||
14 | #elif !defined alloca | ||
15 | # ifdef __GNUC__ | ||
16 | # define alloca __builtin_alloca | ||
17 | # elif defined _AIX | ||
18 | # define alloca __alloca | ||
19 | # elif defined _MSC_VER | ||
20 | # include <malloc.h> | ||
21 | # define alloca _alloca | ||
22 | # elif !defined HAVE_ALLOCA | ||
23 | # ifdef __cplusplus | ||
24 | extern "C" | ||
25 | # endif | ||
26 | void *alloca (size_t); | ||
27 | # endif | ||
28 | #endif | ||
29 | |||
30 | #endif | ||
diff --git a/src/lib/efreet/efreet_base.c b/src/lib/efreet/efreet_base.c index 0c0b286c64..9812c09dcb 100644 --- a/src/lib/efreet/efreet_base.c +++ b/src/lib/efreet/efreet_base.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <unistd.h> | 5 | #include <unistd.h> |
8 | #include <ctype.h> | 6 | #include <ctype.h> |
9 | 7 | ||
diff --git a/src/lib/efreet/efreet_desktop.c b/src/lib/efreet/efreet_desktop.c index df932c0ad7..8b49993105 100644 --- a/src/lib/efreet/efreet_desktop.c +++ b/src/lib/efreet/efreet_desktop.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #ifdef HAVE_EVIL | 5 | #ifdef HAVE_EVIL |
8 | # include <Evil.h> | 6 | # include <Evil.h> |
9 | #endif | 7 | #endif |
diff --git a/src/lib/efreet/efreet_desktop_command.c b/src/lib/efreet/efreet_desktop_command.c index c8f80e41c3..beeac761cb 100644 --- a/src/lib/efreet/efreet_desktop_command.c +++ b/src/lib/efreet/efreet_desktop_command.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <unistd.h> | 5 | #include <unistd.h> |
8 | #include <ctype.h> | 6 | #include <ctype.h> |
9 | 7 | ||
diff --git a/src/lib/efreet/efreet_icon.c b/src/lib/efreet/efreet_icon.c index 4637529da5..229c752f38 100644 --- a/src/lib/efreet/efreet_icon.c +++ b/src/lib/efreet/efreet_icon.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <Ecore.h> | 5 | #include <Ecore.h> |
8 | #include <Ecore_File.h> | 6 | #include <Ecore_File.h> |
9 | 7 | ||
diff --git a/src/lib/efreet/efreet_ini.c b/src/lib/efreet/efreet_ini.c index 5ece68c636..abc184673c 100644 --- a/src/lib/efreet/efreet_ini.c +++ b/src/lib/efreet/efreet_ini.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <ctype.h> | 5 | #include <ctype.h> |
8 | 6 | ||
9 | #include <Ecore_File.h> | 7 | #include <Ecore_File.h> |
diff --git a/src/lib/efreet/efreet_menu.c b/src/lib/efreet/efreet_menu.c index 572f7b887e..cb9b04126f 100644 --- a/src/lib/efreet/efreet_menu.c +++ b/src/lib/efreet/efreet_menu.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <Ecore_File.h> | 5 | #include <Ecore_File.h> |
8 | 6 | ||
9 | /* define macros and variable for using the eina logging system */ | 7 | /* define macros and variable for using the eina logging system */ |
diff --git a/src/lib/efreet/efreet_mime.c b/src/lib/efreet/efreet_mime.c index 56391f3b5d..20ae5c568c 100644 --- a/src/lib/efreet/efreet_mime.c +++ b/src/lib/efreet/efreet_mime.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | #include <ctype.h> | 5 | #include <ctype.h> |
8 | #include <sys/stat.h> | 6 | #include <sys/stat.h> |
9 | #include <fcntl.h> | 7 | #include <fcntl.h> |
diff --git a/src/lib/efreet/efreet_utils.c b/src/lib/efreet/efreet_utils.c index 7037dfd054..87f418b54b 100644 --- a/src/lib/efreet/efreet_utils.c +++ b/src/lib/efreet/efreet_utils.c | |||
@@ -2,8 +2,6 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include "efreet_alloca.h" | ||
6 | |||
7 | /* TODO: add no_display check, as we might want only displayable items */ | 5 | /* TODO: add no_display check, as we might want only displayable items */ |
8 | 6 | ||
9 | #include <fnmatch.h> | 7 | #include <fnmatch.h> |
diff --git a/src/lib/eina/Eina.h b/src/lib/eina/Eina.h index 280cc9a7be..d7d1b86960 100644 --- a/src/lib/eina/Eina.h +++ b/src/lib/eina/Eina.h | |||
@@ -216,6 +216,7 @@ extern "C" { | |||
216 | 216 | ||
217 | #include "eina_config.h" | 217 | #include "eina_config.h" |
218 | #include "eina_types.h" | 218 | #include "eina_types.h" |
219 | #include "eina_alloca.h" | ||
219 | #include "eina_main.h" | 220 | #include "eina_main.h" |
220 | #include "eina_fp.h" | 221 | #include "eina_fp.h" |
221 | #include "eina_rectangle.h" | 222 | #include "eina_rectangle.h" |
diff --git a/src/lib/eina/eina_alloca.h b/src/lib/eina/eina_alloca.h new file mode 100644 index 0000000000..bb529552e1 --- /dev/null +++ b/src/lib/eina/eina_alloca.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* EINA - EFL data type library | ||
2 | * Copyright (C) 2013 Gustavo Sverzut Barbieri | ||
3 | * | ||
4 | * This library is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU Lesser General Public | ||
6 | * License as published by the Free Software Foundation; either | ||
7 | * version 2.1 of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * This library is distributed in the hope that it will be useful, | ||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * Lesser General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU Lesser General Public | ||
15 | * License along with this library; | ||
16 | * if not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #ifndef EINA_ALLOCA_H | ||
20 | #define EINA_ALLOCA_H | ||
21 | |||
22 | /** | ||
23 | * @file eina_alloca.h | ||
24 | * simplifies usage of alloca() by including the proper file | ||
25 | * depending on the platform. | ||
26 | */ | ||
27 | |||
28 | #ifdef EINA_HAVE_ALLOCA_H | ||
29 | # include <alloca.h> | ||
30 | #elif !defined alloca | ||
31 | # ifdef __GNUC__ | ||
32 | # define alloca __builtin_alloca | ||
33 | # elif defined _AIX | ||
34 | # define alloca __alloca | ||
35 | # elif defined _MSC_VER | ||
36 | # include <malloc.h> | ||
37 | # define alloca _alloca | ||
38 | # elif !defined EINA_HAVE_ALLOCA | ||
39 | # ifdef __cplusplus | ||
40 | extern "C" | ||
41 | # endif | ||
42 | void *alloca (long); | ||
43 | # endif | ||
44 | #endif | ||
45 | |||
46 | #endif /* EINA_HAVE_ALLOCA_H */ | ||
diff --git a/src/lib/eina/eina_benchmark.c b/src/lib/eina/eina_benchmark.c index 1ba2a00fec..701c1840cb 100644 --- a/src/lib/eina/eina_benchmark.c +++ b/src/lib/eina/eina_benchmark.c | |||
@@ -20,23 +20,6 @@ | |||
20 | # include "config.h" | 20 | # include "config.h" |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef HAVE_ALLOCA_H | ||
24 | # include <alloca.h> | ||
25 | #elif defined __GNUC__ | ||
26 | # define alloca __builtin_alloca | ||
27 | #elif defined _AIX | ||
28 | # define alloca __alloca | ||
29 | #elif defined _MSC_VER | ||
30 | # include <malloc.h> | ||
31 | # define alloca _alloca | ||
32 | #else | ||
33 | # include <stddef.h> | ||
34 | # ifdef __cplusplus | ||
35 | extern "C" | ||
36 | # endif | ||
37 | void *alloca (size_t); | ||
38 | #endif | ||
39 | |||
40 | #include <stdlib.h> | 23 | #include <stdlib.h> |
41 | #include <stdio.h> | 24 | #include <stdio.h> |
42 | #include <string.h> | 25 | #include <string.h> |
@@ -47,6 +30,7 @@ void *alloca (size_t); | |||
47 | 30 | ||
48 | #include "eina_config.h" | 31 | #include "eina_config.h" |
49 | #include "eina_private.h" | 32 | #include "eina_private.h" |
33 | #include "eina_alloca.h" | ||
50 | #include "eina_log.h" | 34 | #include "eina_log.h" |
51 | #include "eina_benchmark.h" | 35 | #include "eina_benchmark.h" |
52 | #include "eina_inlist.h" | 36 | #include "eina_inlist.h" |
diff --git a/src/lib/eina/eina_config.h.in b/src/lib/eina/eina_config.h.in index 4c16565346..b8ad351d6a 100644 --- a/src/lib/eina/eina_config.h.in +++ b/src/lib/eina/eina_config.h.in | |||
@@ -77,4 +77,9 @@ | |||
77 | #endif | 77 | #endif |
78 | @EINA_CONFIGURE_ENABLE_LOG@ | 78 | @EINA_CONFIGURE_ENABLE_LOG@ |
79 | 79 | ||
80 | #ifdef EINA_HAVE_ALLOCA_H | ||
81 | # undef EINA_HAVE_ALLOCA_H | ||
82 | #endif | ||
83 | @EINA_CONFIGURE_HAVE_ALLOCA_H@ | ||
84 | |||
80 | #endif /* EINA_CONFIG_H_ */ | 85 | #endif /* EINA_CONFIG_H_ */ |
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c index ccc358f50f..15b2192aa1 100644 --- a/src/lib/eina/eina_file.c +++ b/src/lib/eina/eina_file.c | |||
@@ -21,23 +21,6 @@ | |||
21 | # include "config.h" | 21 | # include "config.h" |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifdef HAVE_ALLOCA_H | ||
25 | # include <alloca.h> | ||
26 | #elif defined __GNUC__ | ||
27 | # define alloca __builtin_alloca | ||
28 | #elif defined _AIX | ||
29 | # define alloca __alloca | ||
30 | #elif defined _MSC_VER | ||
31 | # include <malloc.h> | ||
32 | # define alloca _alloca | ||
33 | #else | ||
34 | # include <stddef.h> | ||
35 | # ifdef __cplusplus | ||
36 | extern "C" | ||
37 | # endif | ||
38 | void *alloca (size_t); | ||
39 | #endif | ||
40 | |||
41 | #include <stdlib.h> | 24 | #include <stdlib.h> |
42 | #include <string.h> | 25 | #include <string.h> |
43 | #include <stddef.h> | 26 | #include <stddef.h> |
@@ -58,6 +41,7 @@ void *alloca (size_t); | |||
58 | 41 | ||
59 | #include "eina_config.h" | 42 | #include "eina_config.h" |
60 | #include "eina_private.h" | 43 | #include "eina_private.h" |
44 | #include "eina_alloca.h" | ||
61 | 45 | ||
62 | /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ | 46 | /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ |
63 | #include "eina_safety_checks.h" | 47 | #include "eina_safety_checks.h" |
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c index 927ca7758c..c6832c45c8 100644 --- a/src/lib/eina/eina_file_win32.c +++ b/src/lib/eina/eina_file_win32.c | |||
@@ -20,23 +20,6 @@ | |||
20 | # include "config.h" | 20 | # include "config.h" |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef HAVE_ALLOCA_H | ||
24 | # include <alloca.h> | ||
25 | #elif defined __GNUC__ | ||
26 | # define alloca __builtin_alloca | ||
27 | #elif defined _AIX | ||
28 | # define alloca __alloca | ||
29 | #elif defined _MSC_VER | ||
30 | # include <malloc.h> | ||
31 | # define alloca _alloca | ||
32 | #else | ||
33 | # include <stddef.h> | ||
34 | # ifdef __cplusplus | ||
35 | extern "C" | ||
36 | # endif | ||
37 | void *alloca (size_t); | ||
38 | #endif | ||
39 | |||
40 | #include <sys/types.h> | 23 | #include <sys/types.h> |
41 | #include <sys/stat.h> | 24 | #include <sys/stat.h> |
42 | 25 | ||
@@ -48,6 +31,7 @@ void *alloca (size_t); | |||
48 | 31 | ||
49 | #include "eina_config.h" | 32 | #include "eina_config.h" |
50 | #include "eina_private.h" | 33 | #include "eina_private.h" |
34 | #include "eina_alloca.h" | ||
51 | 35 | ||
52 | /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ | 36 | /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */ |
53 | #include "eina_safety_checks.h" | 37 | #include "eina_safety_checks.h" |
diff --git a/src/lib/eina/eina_model.c b/src/lib/eina/eina_model.c index 16293284ca..4d7f341f27 100644 --- a/src/lib/eina/eina_model.c +++ b/src/lib/eina/eina_model.c | |||
@@ -20,29 +20,13 @@ | |||
20 | # include "config.h" | 20 | # include "config.h" |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef HAVE_ALLOCA_H | ||
24 | # include <alloca.h> | ||
25 | #elif defined __GNUC__ | ||
26 | # define alloca __builtin_alloca | ||
27 | #elif defined _AIX | ||
28 | # define alloca __alloca | ||
29 | #elif defined _MSC_VER | ||
30 | # include <malloc.h> | ||
31 | # define alloca _alloca | ||
32 | #else | ||
33 | # include <stddef.h> | ||
34 | # ifdef __cplusplus | ||
35 | extern "C" | ||
36 | # endif | ||
37 | void *alloca (size_t); | ||
38 | #endif | ||
39 | |||
40 | #ifdef HAVE_EXECINFO_H | 23 | #ifdef HAVE_EXECINFO_H |
41 | #include <execinfo.h> | 24 | #include <execinfo.h> |
42 | #endif | 25 | #endif |
43 | 26 | ||
44 | #include "eina_config.h" | 27 | #include "eina_config.h" |
45 | #include "eina_private.h" | 28 | #include "eina_private.h" |
29 | #include "eina_alloca.h" | ||
46 | #include "eina_error.h" | 30 | #include "eina_error.h" |
47 | #include "eina_log.h" | 31 | #include "eina_log.h" |
48 | #include "eina_mempool.h" | 32 | #include "eina_mempool.h" |
diff --git a/src/lib/eina/eina_module.c b/src/lib/eina/eina_module.c index ab14e8189d..327101a7de 100644 --- a/src/lib/eina/eina_module.c +++ b/src/lib/eina/eina_module.c | |||
@@ -20,23 +20,6 @@ | |||
20 | # include "config.h" | 20 | # include "config.h" |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef HAVE_ALLOCA_H | ||
24 | # include <alloca.h> | ||
25 | #elif defined __GNUC__ | ||
26 | # define alloca __builtin_alloca | ||
27 | #elif defined _AIX | ||
28 | # define alloca __alloca | ||
29 | #elif defined _MSC_VER | ||
30 | # include <malloc.h> | ||
31 | # define alloca _alloca | ||
32 | #else | ||
33 | # include <stddef.h> | ||
34 | # ifdef __cplusplus | ||
35 | extern "C" | ||
36 | # endif | ||
37 | void *alloca (size_t); | ||
38 | #endif | ||
39 | |||
40 | #include <stdlib.h> | 23 | #include <stdlib.h> |
41 | #include <stdio.h> | 24 | #include <stdio.h> |
42 | #include <sys/types.h> | 25 | #include <sys/types.h> |
@@ -64,6 +47,7 @@ void *alloca (size_t); | |||
64 | 47 | ||
65 | #include "eina_config.h" | 48 | #include "eina_config.h" |
66 | #include "eina_private.h" | 49 | #include "eina_private.h" |
50 | #include "eina_alloca.h" | ||
67 | #include "eina_error.h" | 51 | #include "eina_error.h" |
68 | #include "eina_file.h" | 52 | #include "eina_file.h" |
69 | #include "eina_log.h" | 53 | #include "eina_log.h" |
diff --git a/src/lib/eina/eina_prefix.c b/src/lib/eina/eina_prefix.c index c020a10cb1..7d936089fc 100644 --- a/src/lib/eina/eina_prefix.c +++ b/src/lib/eina/eina_prefix.c | |||
@@ -28,23 +28,6 @@ | |||
28 | # include <stdlib.h> | 28 | # include <stdlib.h> |
29 | # endif | 29 | # endif |
30 | #endif | 30 | #endif |
31 | #ifdef HAVE_ALLOCA_H | ||
32 | # include <alloca.h> | ||
33 | #elif !defined alloca | ||
34 | # ifdef __GNUC__ | ||
35 | # define alloca __builtin_alloca | ||
36 | # elif defined _AIX | ||
37 | # define alloca __alloca | ||
38 | # elif defined _MSC_VER | ||
39 | # include <malloc.h> | ||
40 | # define alloca _alloca | ||
41 | # elif !defined HAVE_ALLOCA | ||
42 | # ifdef __cplusplus | ||
43 | extern "C" | ||
44 | # endif | ||
45 | void *alloca (size_t); | ||
46 | # endif | ||
47 | #endif | ||
48 | 31 | ||
49 | #include <stdio.h> | 32 | #include <stdio.h> |
50 | #include <stdlib.h> | 33 | #include <stdlib.h> |
@@ -71,6 +54,7 @@ void *alloca (size_t); | |||
71 | 54 | ||
72 | #include "eina_config.h" | 55 | #include "eina_config.h" |
73 | #include "eina_private.h" | 56 | #include "eina_private.h" |
57 | #include "eina_alloca.h" | ||
74 | #include "eina_log.h" | 58 | #include "eina_log.h" |
75 | #include "eina_prefix.h" | 59 | #include "eina_prefix.h" |
76 | 60 | ||
diff --git a/src/lib/eina/eina_simple_xml_parser.c b/src/lib/eina/eina_simple_xml_parser.c index eeb5a96032..1f978b0726 100644 --- a/src/lib/eina/eina_simple_xml_parser.c +++ b/src/lib/eina/eina_simple_xml_parser.c | |||
@@ -21,22 +21,6 @@ | |||
21 | # include "config.h" | 21 | # include "config.h" |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #ifdef HAVE_ALLOCA_H | ||
25 | # include <alloca.h> | ||
26 | #elif defined __GNUC__ | ||
27 | # define alloca __builtin_alloca | ||
28 | #elif defined _AIX | ||
29 | # define alloca __alloca | ||
30 | #elif defined _MSC_VER | ||
31 | # include <malloc.h> | ||
32 | # define alloca _alloca | ||
33 | #else | ||
34 | # include <stddef.h> | ||
35 | # ifdef __cplusplus | ||
36 | extern "C" | ||
37 | # endif | ||
38 | void *alloca (size_t); | ||
39 | #endif | ||
40 | 24 | ||
41 | #ifdef HAVE_STRINGS_H | 25 | #ifdef HAVE_STRINGS_H |
42 | # include <strings.h> | 26 | # include <strings.h> |
@@ -49,7 +33,9 @@ void *alloca (size_t); | |||
49 | # include <Evil.h> | 33 | # include <Evil.h> |
50 | #endif | 34 | #endif |
51 | 35 | ||
36 | #include "eina_config.h" | ||
52 | #include "eina_private.h" | 37 | #include "eina_private.h" |
38 | #include "eina_alloca.h" | ||
53 | #include "eina_log.h" | 39 | #include "eina_log.h" |
54 | #include "eina_mempool.h" | 40 | #include "eina_mempool.h" |
55 | #include "eina_stringshare.h" | 41 | #include "eina_stringshare.h" |
diff --git a/src/lib/eina/eina_stringshare.c b/src/lib/eina/eina_stringshare.c index 2a457f4736..2acb98ca8a 100644 --- a/src/lib/eina/eina_stringshare.c +++ b/src/lib/eina/eina_stringshare.c | |||
@@ -26,23 +26,6 @@ | |||
26 | # include "config.h" | 26 | # include "config.h" |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | #ifdef HAVE_ALLOCA_H | ||
30 | # include <alloca.h> | ||
31 | #elif defined __GNUC__ | ||
32 | # define alloca __builtin_alloca | ||
33 | #elif defined _AIX | ||
34 | # define alloca __alloca | ||
35 | #elif defined _MSC_VER | ||
36 | # include <malloc.h> | ||
37 | # define alloca _alloca | ||
38 | #else | ||
39 | # include <stddef.h> | ||
40 | # ifdef __cplusplus | ||
41 | extern "C" | ||
42 | # endif | ||
43 | void *alloca (size_t); | ||
44 | #endif | ||
45 | |||
46 | #include <stdlib.h> | 29 | #include <stdlib.h> |
47 | #include <stdio.h> | 30 | #include <stdio.h> |
48 | #include <string.h> | 31 | #include <string.h> |
@@ -53,6 +36,7 @@ void *alloca (size_t); | |||
53 | 36 | ||
54 | #include "eina_config.h" | 37 | #include "eina_config.h" |
55 | #include "eina_private.h" | 38 | #include "eina_private.h" |
39 | #include "eina_alloca.h" | ||
56 | #include "eina_error.h" | 40 | #include "eina_error.h" |
57 | #include "eina_log.h" | 41 | #include "eina_log.h" |
58 | #include "eina_lock.h" | 42 | #include "eina_lock.h" |
diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c index 3e7ee3f725..b245b67288 100644 --- a/src/lib/eina/eina_value.c +++ b/src/lib/eina/eina_value.c | |||
@@ -20,23 +20,6 @@ | |||
20 | # include "config.h" | 20 | # include "config.h" |
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef HAVE_ALLOCA_H | ||
24 | # include <alloca.h> | ||
25 | #elif defined __GNUC__ | ||
26 | # define alloca __builtin_alloca | ||
27 | #elif defined _AIX | ||
28 | # define alloca __alloca | ||
29 | #elif defined _MSC_VER | ||
30 | # include <malloc.h> | ||
31 | # define alloca _alloca | ||
32 | #else | ||
33 | # include <stddef.h> | ||
34 | # ifdef __cplusplus | ||
35 | extern "C" | ||
36 | # endif | ||
37 | void *alloca (size_t); | ||
38 | #endif | ||
39 | |||
40 | #include <stdio.h> /* asprintf() */ | 23 | #include <stdio.h> /* asprintf() */ |
41 | #include <inttypes.h> /* PRId64 and PRIu64 */ | 24 | #include <inttypes.h> /* PRId64 and PRIu64 */ |
42 | #include <sys/time.h> /* struct timeval */ | 25 | #include <sys/time.h> /* struct timeval */ |
@@ -47,6 +30,7 @@ void *alloca (size_t); | |||
47 | 30 | ||
48 | #include "eina_config.h" | 31 | #include "eina_config.h" |
49 | #include "eina_private.h" | 32 | #include "eina_private.h" |
33 | #include "eina_alloca.h" | ||
50 | #include "eina_error.h" | 34 | #include "eina_error.h" |
51 | #include "eina_log.h" | 35 | #include "eina_log.h" |
52 | #include "eina_strbuf.h" | 36 | #include "eina_strbuf.h" |
diff --git a/src/lib/eio/eio_private.h b/src/lib/eio/eio_private.h index 4b7ecf8b50..3a47200890 100644 --- a/src/lib/eio/eio_private.h +++ b/src/lib/eio/eio_private.h | |||
@@ -13,23 +13,6 @@ | |||
13 | # include <stdlib.h> | 13 | # include <stdlib.h> |
14 | # endif | 14 | # endif |
15 | #endif | 15 | #endif |
16 | #ifdef HAVE_ALLOCA_H | ||
17 | # include <alloca.h> | ||
18 | #elif !defined alloca | ||
19 | # ifdef __GNUC__ | ||
20 | # define alloca __builtin_alloca | ||
21 | # elif defined _AIX | ||
22 | # define alloca __alloca | ||
23 | # elif defined _MSC_VER | ||
24 | # include <malloc.h> | ||
25 | # define alloca _alloca | ||
26 | # elif !defined HAVE_ALLOCA | ||
27 | # ifdef __cplusplus | ||
28 | extern "C" | ||
29 | # endif | ||
30 | void *alloca (size_t); | ||
31 | # endif | ||
32 | #endif | ||
33 | 16 | ||
34 | #include <sys/types.h> | 17 | #include <sys/types.h> |
35 | #ifdef HAVE_DIRENT_H | 18 | #ifdef HAVE_DIRENT_H |
diff --git a/src/lib/embryo/embryo_args.c b/src/lib/embryo/embryo_args.c index e9cef2bb25..c0682e6353 100644 --- a/src/lib/embryo/embryo_args.c +++ b/src/lib/embryo/embryo_args.c | |||
@@ -2,23 +2,6 @@ | |||
2 | # include "config.h" | 2 | # include "config.h" |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #ifdef HAVE_ALLOCA_H | ||
6 | # include <alloca.h> | ||
7 | #elif defined __GNUC__ | ||
8 | # define alloca __builtin_alloca | ||
9 | #elif defined _AIX | ||
10 | # define alloca __alloca | ||
11 | #elif defined _MSC_VER | ||
12 | # include <malloc.h> | ||
13 | # define alloca _alloca | ||
14 | #else | ||
15 | # include <stddef.h> | ||
16 | # ifdef __cplusplus | ||
17 | extern "C" | ||
18 | # endif | ||
19 | void *alloca (size_t); | ||
20 | #endif | ||
21 | |||
22 | #include <Eina.h> | 5 | #include <Eina.h> |
23 | 6 | ||
24 | #include "Embryo.h" | 7 | #include "Embryo.h" |
diff --git a/src/lib/embryo/embryo_str.c b/src/lib/embryo/embryo_str.c index 0c2faa2d15..3f180cef00 100644 --- a/src/lib/embryo/embryo_str.c +++ b/src/lib/embryo/embryo_str.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #ifdef HAVE_EXOTIC | 14 | #ifdef HAVE_EXOTIC |
32 | # include <Exotic.h> | 15 | # include <Exotic.h> |
diff --git a/src/lib/evas/include/evas_common.h b/src/lib/evas/include/evas_common.h index 01029034c6..4741140dfa 100644 --- a/src/lib/evas/include/evas_common.h +++ b/src/lib/evas/include/evas_common.h | |||
@@ -13,23 +13,6 @@ | |||
13 | # include <stdlib.h> | 13 | # include <stdlib.h> |
14 | # endif | 14 | # endif |
15 | #endif | 15 | #endif |
16 | #ifdef HAVE_ALLOCA_H | ||
17 | # include <alloca.h> | ||
18 | #elif !defined alloca | ||
19 | # ifdef __GNUC__ | ||
20 | # define alloca __builtin_alloca | ||
21 | # elif defined _AIX | ||
22 | # define alloca __alloca | ||
23 | # elif defined _MSC_VER | ||
24 | # include <malloc.h> | ||
25 | # define alloca _alloca | ||
26 | # elif !defined HAVE_ALLOCA | ||
27 | # ifdef __cplusplus | ||
28 | extern "C" | ||
29 | # endif | ||
30 | void *alloca (size_t); | ||
31 | # endif | ||
32 | #endif | ||
33 | 16 | ||
34 | #include <stdio.h> | 17 | #include <stdio.h> |
35 | #include <stdlib.h> | 18 | #include <stdlib.h> |
diff --git a/src/modules/ecore_evas/engines/buffer/ecore_evas_extn.c b/src/modules/ecore_evas/engines/buffer/ecore_evas_extn.c index 1bba72640d..7b2ec056fa 100644 --- a/src/modules/ecore_evas/engines/buffer/ecore_evas_extn.c +++ b/src/modules/ecore_evas/engines/buffer/ecore_evas_extn.c | |||
@@ -10,23 +10,6 @@ | |||
10 | # include <stdlib.h> | 10 | # include <stdlib.h> |
11 | # endif | 11 | # endif |
12 | #endif | 12 | #endif |
13 | #ifdef HAVE_ALLOCA_H | ||
14 | # include <alloca.h> | ||
15 | #elif !defined alloca | ||
16 | # ifdef __GNUC__ | ||
17 | # define alloca __builtin_alloca | ||
18 | # elif defined _AIX | ||
19 | # define alloca __alloca | ||
20 | # elif defined _MSC_VER | ||
21 | # include <malloc.h> | ||
22 | # define alloca _alloca | ||
23 | # elif !defined HAVE_ALLOCA | ||
24 | # ifdef __cplusplus | ||
25 | extern "C" | ||
26 | # endif | ||
27 | void *alloca (size_t); | ||
28 | # endif | ||
29 | #endif | ||
30 | 13 | ||
31 | #include <stdio.h> | 14 | #include <stdio.h> |
32 | #include <sys/types.h> | 15 | #include <sys/types.h> |