Octave-Forge - Extra packages for GNU Octave | |
Home · Packages · Developers · Documentation · FAQ · Bugs · Mailing Lists · Links · Code |
00001 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 00002 /* -*- buffer-read-only: t -*- vi: set ro: */ 00003 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 00004 /* Memory allocation on the stack. 00005 00006 Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation, 00007 Inc. 00008 00009 This program is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU General Public License as published 00011 by the Free Software Foundation; either version 3, or (at your option) 00012 any later version. 00013 00014 This program is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00017 General Public License for more details. 00018 00019 You should have received a copy of the GNU General Public 00020 License along with this program; if not, write to the Free Software 00021 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00022 USA. */ 00023 00024 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H 00025 means there is a real alloca function. */ 00026 #ifndef _GL_ALLOCA_H 00027 #define _GL_ALLOCA_H 00028 00029 /* alloca (N) returns a pointer to N bytes of memory 00030 allocated on the stack, which will last until the function returns. 00031 Use of alloca should be avoided: 00032 - inside arguments of function calls - undefined behaviour, 00033 - in inline functions - the allocation may actually last until the 00034 calling function returns, 00035 - for huge N (say, N >= 65536) - you never know how large (or small) 00036 the stack is, and when the stack cannot fulfill the memory allocation 00037 request, the program just crashes. 00038 */ 00039 00040 #ifndef alloca 00041 # ifdef __GNUC__ 00042 # define alloca __builtin_alloca 00043 # elif defined _AIX 00044 # define alloca __alloca 00045 # elif defined _MSC_VER 00046 # include <malloc.h> 00047 # define alloca _alloca 00048 # elif defined __DECC && defined __VMS 00049 # define alloca __ALLOCA 00050 # else 00051 # include <stddef.h> 00052 # ifdef __cplusplus 00053 extern "C" 00054 # endif 00055 void *alloca (size_t); 00056 # endif 00057 #endif 00058 00059 #endif /* _GL_ALLOCA_H */