[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
allocsa module update
From: |
Bruno Haible |
Subject: |
allocsa module update |
Date: |
Sat, 22 Jul 2006 15:53:42 +0200 |
User-agent: |
KMail/1.9.1 |
Merge from gettext:
2005-02-12 Bruno Haible <address@hidden>
* allocsa.h: Add extern "C" for C++.
2005-02-10 Bruno Haible <address@hidden>
* allocsa.h (sa_alignof): Define differently with AIX xlc, to avoid
a bug of this compiler on AIX 3.2.5 dealing with enums.
*** allocsa.h 14 May 2005 06:03:57 -0000 1.4
--- allocsa.h 22 Jul 2006 13:55:31 -0000
***************
*** 1,5 ****
/* Safe automatic memory allocation.
! Copyright (C) 2003-2004 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2003.
This program is free software; you can redistribute it and/or modify
--- 1,5 ----
/* Safe automatic memory allocation.
! Copyright (C) 2003-2005 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2003.
This program is free software; you can redistribute it and/or modify
***************
*** 23,28 ****
--- 23,34 ----
#include <stddef.h>
#include <stdlib.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+
+
/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
alloca(N); otherwise it returns NULL. It either returns N bytes of
memory allocated on the stack, that lasts until the function returns,
***************
*** 69,74 ****
--- 75,85 ----
If this would be useful in your application. please speak up. */
+ #ifdef __cplusplus
+ }
+ #endif
+
+
/* ------------------- Auxiliary, non-public definitions -------------------
*/
/* Determine the alignment of a type at compile time. */
***************
*** 81,86 ****
--- 92,101 ----
/* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
values. */
# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
+ #elif defined _AIX
+ /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof
+ values. */
+ # define sa_alignof(type) 4
#else
# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; },
__slot2)
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- allocsa module update,
Bruno Haible <=