efl: eina_alloca.h to simplify alloca() usage.

having to replicate 18 lines per file just to access alloca() is
insane. Let's do that in Eina.h and avoid that crap :-/



SVN revision: 82082
This commit is contained in:
Gustavo Sverzut Barbieri 2013-01-03 15:10:34 +00:00
parent c1d576dcc7
commit 0a2d116119
48 changed files with 70 additions and 560 deletions

View File

@ -1,3 +1,7 @@
2013-01-03 Gustavo Sverzut Barbieri (k-s)
* Add eina_alloc.h to Eina.h to define alloca()
2013-01-03 Cedric Bail
* Use Eina_File for evas png loader.

1
NEWS
View File

@ -71,6 +71,7 @@ Improvements:
* eina_magic_fail() now throws error messages on NULL pointers instead of critical
* all efl object-freeing functions now take NULL without crashing or erroring
* use Eina_File in webp, gif, tiff, png and eet loader
* Eina.h includes eina_alloca.h/alloca.h to define alloca()
Fixes:
* Fix PPC (big endian) image codec bug.

View File

@ -732,6 +732,7 @@ case "${build_profile}" in
;;
esac
EINA_CONFIG([HAVE_ALLOCA_H], [test "x${ac_cv_working_alloca_h}" = "xyes"])
EINA_CONFIG([MAGIC_DEBUG], [test "x${have_magic_debug}" = "xyes"])
EINA_CONFIG([SAFETY_CHECKS], [test "x${have_safety_checks}" = "xyes"])
EINA_CONFIG([DEFAULT_MEMPOOL], [test "x${want_default_mempool}" = "xyes"])

View File

@ -76,7 +76,8 @@ lib/eina/eina_xattr.h \
lib/eina/eina_value.h \
lib/eina/eina_inline_value.x \
lib/eina/eina_inline_lock_barrier.x \
lib/eina/eina_tmpstr.h
lib/eina/eina_tmpstr.h \
lib/eina/eina_alloca.h
# Will be back for developper after 1.2.
# lib/eina/eina_model.h

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdlib.h>
#include <stdio.h>

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <Eina.h>

View File

@ -17,23 +17,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <string.h>
#include <sys/types.h>

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#if HAVE_GNUTLS
# include <gnutls/gnutls.h>

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdlib.h>
#include <stdio.h>

View File

@ -15,23 +15,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
# include <unistd.h> // included for close & gethostname functions

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdlib.h>
#include <string.h>

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <string.h>

View File

@ -14,23 +14,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include "Ecore.h"
#include "ecore_x_private.h"

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdlib.h>
#include <string.h>

View File

@ -14,23 +14,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include "ecore_x_private.h"
#include "ecore_x_randr.h"

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdlib.h>
#include <string.h>

View File

@ -2,23 +2,6 @@
# include <config.h>
#endif /* ifdef HAVE_CONFIG_H */
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else /* ifdef HAVE_ALLOCA_H */
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif /* ifdef __cplusplus */
void *alloca(size_t);
#endif /* ifdef HAVE_ALLOCA_H */
#include <stdio.h>
#include <string.h>
#include <sys/types.h>

View File

@ -2,23 +2,6 @@
# include <config.h>
#endif /* ifdef HAVE_CONFIG_H */
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else /* ifdef HAVE_ALLOCA_H */
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif /* ifdef __cplusplus */
void *alloca(size_t);
#endif /* ifdef HAVE_ALLOCA_H */
#include <string.h>
#include <stdlib.h>

View File

@ -2,23 +2,6 @@
# include <config.h>
#endif /* ifdef HAVE_CONFIG_H */
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else /* ifdef HAVE_ALLOCA_H */
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif /* ifdef __cplusplus */
void *alloca(size_t);
#endif /* ifdef HAVE_ALLOCA_H */
#ifdef HAVE_NETINET_IN_H
# ifdef __OpenBSD__
# include <sys/types.h>

View File

@ -2,23 +2,6 @@
# include <config.h>
#endif /* ifdef HAVE_CONFIG_H */
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else /* ifdef HAVE_ALLOCA_H */
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif /* ifdef __cplusplus */
void *alloca(size_t);
#endif /* ifdef HAVE_ALLOCA_H */
#ifdef _WIN32
# include <winsock2.h>
#endif /* ifdef _WIN32 */

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -1,30 +0,0 @@
#ifndef EFREET_ALLOCA_H
#define EFREET_ALLOCA_H
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#endif

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <unistd.h>
#include <ctype.h>

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#ifdef HAVE_EVIL
# include <Evil.h>
#endif

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <unistd.h>
#include <ctype.h>

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <Ecore.h>
#include <Ecore_File.h>

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <ctype.h>
#include <Ecore_File.h>

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <Ecore_File.h>
/* define macros and variable for using the eina logging system */

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
#include <ctype.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -2,8 +2,6 @@
# include <config.h>
#endif
#include "efreet_alloca.h"
/* TODO: add no_display check, as we might want only displayable items */
#include <fnmatch.h>

View File

@ -216,6 +216,7 @@ extern "C" {
#include "eina_config.h"
#include "eina_types.h"
#include "eina_alloca.h"
#include "eina_main.h"
#include "eina_fp.h"
#include "eina_rectangle.h"

View File

@ -0,0 +1,46 @@
/* EINA - EFL data type library
* Copyright (C) 2013 Gustavo Sverzut Barbieri
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library;
* if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef EINA_ALLOCA_H
#define EINA_ALLOCA_H
/**
* @file eina_alloca.h
* simplifies usage of alloca() by including the proper file
* depending on the platform.
*/
#ifdef EINA_HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined EINA_HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (long);
# endif
#endif
#endif /* EINA_HAVE_ALLOCA_H */

View File

@ -20,23 +20,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -47,6 +30,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_log.h"
#include "eina_benchmark.h"
#include "eina_inlist.h"

View File

@ -77,4 +77,9 @@
#endif
@EINA_CONFIGURE_ENABLE_LOG@
#ifdef EINA_HAVE_ALLOCA_H
# undef EINA_HAVE_ALLOCA_H
#endif
@EINA_CONFIGURE_HAVE_ALLOCA_H@
#endif /* EINA_CONFIG_H_ */

View File

@ -21,23 +21,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
@ -58,6 +41,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
#include "eina_safety_checks.h"

View File

@ -20,23 +20,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <sys/types.h>
#include <sys/stat.h>
@ -48,6 +31,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
/* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
#include "eina_safety_checks.h"

View File

@ -20,29 +20,13 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_error.h"
#include "eina_log.h"
#include "eina_mempool.h"

View File

@ -20,23 +20,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
@ -64,6 +47,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_error.h"
#include "eina_file.h"
#include "eina_log.h"

View File

@ -28,23 +28,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdio.h>
#include <stdlib.h>
@ -71,6 +54,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_log.h"
#include "eina_prefix.h"

View File

@ -21,22 +21,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#ifdef HAVE_STRINGS_H
# include <strings.h>
@ -49,7 +33,9 @@ void *alloca (size_t);
# include <Evil.h>
#endif
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_log.h"
#include "eina_mempool.h"
#include "eina_stringshare.h"

View File

@ -26,23 +26,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -53,6 +36,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_error.h"
#include "eina_log.h"
#include "eina_lock.h"

View File

@ -20,23 +20,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <stdio.h> /* asprintf() */
#include <inttypes.h> /* PRId64 and PRIu64 */
#include <sys/time.h> /* struct timeval */
@ -47,6 +30,7 @@ void *alloca (size_t);
#include "eina_config.h"
#include "eina_private.h"
#include "eina_alloca.h"
#include "eina_error.h"
#include "eina_log.h"
#include "eina_strbuf.h"

View File

@ -13,23 +13,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <sys/types.h>
#ifdef HAVE_DIRENT_H

View File

@ -2,23 +2,6 @@
# include "config.h"
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif defined __GNUC__
# define alloca __builtin_alloca
#elif defined _AIX
# define alloca __alloca
#elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
#else
# include <stddef.h>
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
#endif
#include <Eina.h>
#include "Embryo.h"

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#ifdef HAVE_EXOTIC
# include <Exotic.h>

View File

@ -13,23 +13,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -10,23 +10,6 @@
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t);
# endif
#endif
#include <stdio.h>
#include <sys/types.h>