ldmud-3.3.719/
ldmud-3.3.719/doc/
ldmud-3.3.719/doc/efun.de/
ldmud-3.3.719/doc/efun/
ldmud-3.3.719/doc/man/
ldmud-3.3.719/doc/other/
ldmud-3.3.719/mud/
ldmud-3.3.719/mud/heaven7/
ldmud-3.3.719/mud/lp-245/
ldmud-3.3.719/mud/lp-245/banish/
ldmud-3.3.719/mud/lp-245/doc/
ldmud-3.3.719/mud/lp-245/doc/examples/
ldmud-3.3.719/mud/lp-245/doc/sefun/
ldmud-3.3.719/mud/lp-245/log/
ldmud-3.3.719/mud/lp-245/obj/Go/
ldmud-3.3.719/mud/lp-245/players/lars/
ldmud-3.3.719/mud/lp-245/room/death/
ldmud-3.3.719/mud/lp-245/room/maze1/
ldmud-3.3.719/mud/lp-245/room/sub/
ldmud-3.3.719/mud/lp-245/secure/
ldmud-3.3.719/mud/sticklib/
ldmud-3.3.719/mud/sticklib/src/
ldmud-3.3.719/mudlib/deprecated/
ldmud-3.3.719/mudlib/uni-crasher/
ldmud-3.3.719/pkg/
ldmud-3.3.719/pkg/debugger/
ldmud-3.3.719/pkg/diff/
ldmud-3.3.719/pkg/misc/
ldmud-3.3.719/src/
ldmud-3.3.719/src/autoconf/
ldmud-3.3.719/src/ptmalloc/
ldmud-3.3.719/src/util/
ldmud-3.3.719/src/util/erq/
ldmud-3.3.719/src/util/indent/hosts/next/
ldmud-3.3.719/src/util/xerq/
ldmud-3.3.719/src/util/xerq/lpc/
ldmud-3.3.719/src/util/xerq/lpc/www/
ldmud-3.3.719/test/generic/
ldmud-3.3.719/test/inc/
ldmud-3.3.719/test/t-0000398/
ldmud-3.3.719/test/t-0000548/
ldmud-3.3.719/test/t-030925/
ldmud-3.3.719/test/t-040413/
ldmud-3.3.719/test/t-041124/
ldmud-3.3.719/test/t-language/
#ifndef MY_ALLOCA_H__
#define MY_ALLOCA_H__

/*------------------------------------------------------------------
 * Portable definition of alloca().
 *
 * Use this file instead of the normal <alloca.h>.
 *
 * If you have a function making heavy use of alloca(), it is a good
 * idea to use GC_ALLOCA in the calling function after the call.
 * This macro takes care that for the C-version of alloca the memory
 * usage is kept in limits.
 *------------------------------------------------------------------
 */

#include "driver.h"

#if !defined(C_ALLOCA) || defined(MAKE_FUNC)

#ifdef HAVE_ALLOCA_H
#    include <alloca.h>
#else /* !HAVE_ALLOCA_H */
#    ifdef __GNUC__
#        ifndef alloca
#            define alloca(size) __builtin_alloca(size)
#        endif
#    else /* !__GNUC__ */
#        ifdef _AIX
#            pragma alloca
#        endif /* _AIX */
#    endif /* !__GNUC__ */
#endif /* !HAVE_ALLOCA_H */

#define GC_ALLOCA NOOP

#else /* defined(C_ALLOCA) && !defined(MAKE_FUNC) */

#include <sys/types.h>

#ifdef alloca
#    undef alloca
#endif

extern void * alloca(size_t);

#define GC_ALLOCA alloca(0)

#endif  /* C_ALLOCA */

#endif /* MY_ALLOCA_H__ */