1b86ad3f3Szrj /* 2b86ad3f3Szrj * Copyright (c) 2019 The DragonFly Project. All rights reserved. 3b86ad3f3Szrj * 4b86ad3f3Szrj * Redistribution and use in source and binary forms, with or without 5b86ad3f3Szrj * modification, are permitted provided that the following conditions 6b86ad3f3Szrj * are met: 7b86ad3f3Szrj * 1. Redistributions of source code must retain the above copyright 8b86ad3f3Szrj * notice, this list of conditions and the following disclaimer. 9b86ad3f3Szrj * 2. Redistributions in binary form must reproduce the above copyright 10b86ad3f3Szrj * notice, this list of conditions and the following disclaimer in the 11b86ad3f3Szrj * documentation and/or other materials provided with the distribution. 12b86ad3f3Szrj * 13b86ad3f3Szrj * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 14b86ad3f3Szrj * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 15b86ad3f3Szrj * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 16b86ad3f3Szrj * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 17b86ad3f3Szrj * COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 18b86ad3f3Szrj * INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING, 19b86ad3f3Szrj * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 20b86ad3f3Szrj * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 21b86ad3f3Szrj * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22b86ad3f3Szrj * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 23b86ad3f3Szrj * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24b86ad3f3Szrj * SUCH DAMAGE. 25b86ad3f3Szrj */ 26b86ad3f3Szrj 27b86ad3f3Szrj #ifndef _ALLOCA_H_ 28b86ad3f3Szrj #define _ALLOCA_H_ 29b86ad3f3Szrj 30b86ad3f3Szrj #include <sys/cdefs.h> 31b86ad3f3Szrj #include <stddef.h> 32b86ad3f3Szrj 33b86ad3f3Szrj /* 34159c86f1Szrj * This header is for compatibility only. Keep __GNUC__ >= 2 for ports tests. 35b86ad3f3Szrj */ 36b86ad3f3Szrj 37b86ad3f3Szrj __BEGIN_DECLS 38b86ad3f3Szrj #undef alloca /* some GNU bits try to get cute and define this on their own */ 39b86ad3f3Szrj void *alloca(size_t); 40b86ad3f3Szrj 41*c78f0d6aSSascha Wildner #if __GNUC__ >= 2 42b86ad3f3Szrj #define alloca(sz) __builtin_alloca(sz) 43b86ad3f3Szrj #endif 44b86ad3f3Szrj __END_DECLS 45b86ad3f3Szrj 46b86ad3f3Szrj #endif /* !_ALLOCA_H_ */ 47