1 /* Generic alloca.h */ 2 /* $OpenLDAP: pkg/ldap/include/ac/alloca.h,v 1.18.2.3 2008/02/11 23:26:40 kurt Exp $ */ 3 /* This work is part of OpenLDAP Software <http://www.openldap.org/>. 4 * 5 * Copyright 1998-2008 The OpenLDAP Foundation. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted only as authorized by the OpenLDAP 10 * Public License. 11 * 12 * A copy of this license is available in file LICENSE in the 13 * top-level directory of the distribution or, alternatively, at 14 * <http://www.OpenLDAP.org/license.html>. 15 */ 16 17 #ifndef _AC_ALLOCA_H 18 #define _AC_ALLOCA_H 19 20 /* 21 * use of alloca is disallowed as it is machine dependent 22 */ 23 #error "alloca() not supported, use malloc()" 24 25 /* AIX requires this to be the first thing in the file. */ 26 #ifdef __GNUC__ 27 # define alloca __builtin_alloca 28 #else 29 # ifdef HAVE_ALLOCA_H 30 # include <alloca.h> 31 # else 32 # ifdef _AIX 33 #pragma alloca 34 # else 35 # ifndef alloca /* predefined by HP cc +Olibcalls */ 36 extern char *(alloca)(); 37 # endif 38 # endif 39 # endif 40 #endif 41 42 43 #endif /* _AC_ALLOCA_H */ 44