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