diff options
Diffstat (limited to 'gl/malloca.h')
-rw-r--r-- | gl/malloca.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gl/malloca.h b/gl/malloca.h index 0d5ded3..6fbe45e 100644 --- a/gl/malloca.h +++ b/gl/malloca.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* Safe automatic memory allocation. | 1 | /* Safe automatic memory allocation. |
2 | Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc. | 2 | Copyright (C) 2003-2007, 2009-2013 Free Software Foundation, Inc. |
3 | Written by Bruno Haible <bruno@clisp.org>, 2003. | 3 | Written by Bruno Haible <bruno@clisp.org>, 2003. |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
@@ -13,8 +13,7 @@ | |||
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software Foundation, | 16 | along with this program; if not, see <http://www.gnu.org/licenses/>. */ |
17 | Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ | ||
18 | 17 | ||
19 | #ifndef _MALLOCA_H | 18 | #ifndef _MALLOCA_H |
20 | #define _MALLOCA_H | 19 | #define _MALLOCA_H |
@@ -43,7 +42,7 @@ extern "C" { | |||
43 | and a page size can be as small as 4096 bytes. So we cannot safely | 42 | and a page size can be as small as 4096 bytes. So we cannot safely |
44 | allocate anything larger than 4096 bytes. Also care for the possibility | 43 | allocate anything larger than 4096 bytes. Also care for the possibility |
45 | of a few compiler-allocated temporary stack slots. | 44 | of a few compiler-allocated temporary stack slots. |
46 | This must be a macro, not an inline function. */ | 45 | This must be a macro, not a function. */ |
47 | # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) | 46 | # define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) |
48 | #else | 47 | #else |
49 | # define safe_alloca(N) ((void) (N), NULL) | 48 | # define safe_alloca(N) ((void) (N), NULL) |
@@ -93,7 +92,7 @@ extern void * nmalloca (size_t n, size_t s); | |||
93 | /* ------------------- Auxiliary, non-public definitions ------------------- */ | 92 | /* ------------------- Auxiliary, non-public definitions ------------------- */ |
94 | 93 | ||
95 | /* Determine the alignment of a type at compile time. */ | 94 | /* Determine the alignment of a type at compile time. */ |
96 | #if defined __GNUC__ | 95 | #if defined __GNUC__ || defined __IBM__ALIGNOF__ |
97 | # define sa_alignof __alignof__ | 96 | # define sa_alignof __alignof__ |
98 | #elif defined __cplusplus | 97 | #elif defined __cplusplus |
99 | template <class type> struct sa_alignof_helper { char __slot1; type __slot2; }; | 98 | template <class type> struct sa_alignof_helper { char __slot1; type __slot2; }; |