#define _HAVE_STDC
#endif
+/* ISO C++. */
+
+#ifdef __cplusplus
+#if !(defined(_BEGIN_STD_C) && defined(_END_STD_C))
+#ifdef _HAVE_STD_CXX
+#define _BEGIN_STD_C namespace std { extern "C" {
+#define _END_STD_C } }
+#else
+#define _BEGIN_STD_C extern "C" {
+#define _END_STD_C }
+#endif
+#if defined(__GNUC__) && \
+ ( (__GNUC__ >= 4) || \
+ ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
+#define _NOTHROW __attribute__ ((nothrow))
+#else
+#define _NOTHROW throw()
+#endif
+#endif
+#else
+#define _BEGIN_STD_C
+#define _END_STD_C
+#define _NOTHROW
+#endif
+
#ifdef _HAVE_STDC
#define _PTR void *
#define _AND ,
#define _DOTS , ...
#define _VOID void
#ifdef __CYGWIN__
+#define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW
#define _EXFUN(name, proto) __cdecl name proto
#define _EXPARM(name, proto) (* __cdecl name) proto
#else
+#define _EXFUN_NOTHROW(name, proto) name proto _NOTHROW
#define _EXFUN(name, proto) name proto
#define _EXPARM(name, proto) (* name) proto
#endif
#define _DOTS
#define _VOID void
#define _EXFUN(name, proto) name()
+#define _EXFUN_NOTHROW(name, proto) name()
#define _DEFUN(name, arglist, args) name arglist args;
#define _DEFUN_VOID(name) name()
#define _CAST_VOID
#define _ELIDABLE_INLINE __inline__
#endif
-/* ISO C++. */
-
-#ifdef __cplusplus
-#if !(defined(_BEGIN_STD_C) && defined(_END_STD_C))
-#ifdef _HAVE_STD_CXX
-#define _BEGIN_STD_C namespace std { extern "C" {
-#define _END_STD_C } }
-#else
-#define _BEGIN_STD_C extern "C" {
-#define _END_STD_C }
-#endif
-#endif
-#else
-#define _BEGIN_STD_C
-#define _END_STD_C
-#endif
-
#endif /* _ANSIDECL_H_ */
size_t __nmemb,
size_t __size,
int _EXPARM(_compar,(const _PTR, const _PTR))));
-_PTR _EXFUN(calloc,(size_t __nmemb, size_t __size));
+_PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size));
div_t _EXFUN(div,(int __numer, int __denom));
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn)));
-_VOID _EXFUN(free,(_PTR));
+_VOID _EXFUN_NOTHROW(free,(_PTR));
char * _EXFUN(getenv,(const char *__string));
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
char * _EXFUN(_findenv,(_CONST char *, int *));
char * _EXFUN(_findenv_r,(struct _reent *, _CONST char *, int *));
long _EXFUN(labs,(long));
ldiv_t _EXFUN(ldiv,(long __numer, long __denom));
-_PTR _EXFUN(malloc,(size_t __size));
+_PTR _EXFUN_NOTHROW(malloc,(size_t __size));
int _EXFUN(mblen,(const char *, size_t));
int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *));
int _EXFUN(mbtowc,(wchar_t *, const char *, size_t));
#endif
_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, int(*_compar)(const _PTR, const _PTR)));
int _EXFUN(rand,(_VOID));
-_PTR _EXFUN(realloc,(_PTR __r, size_t __size));
+_PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size));
#ifndef __STRICT_ANSI__
_PTR _EXFUN(reallocf,(_PTR __r, size_t __size));
#endif
char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
#ifndef __CYGWIN__
-_PTR _EXFUN(_malloc_r,(struct _reent *, size_t));
-_PTR _EXFUN(_calloc_r,(struct _reent *, size_t, size_t));
-_VOID _EXFUN(_free_r,(struct _reent *, _PTR));
-_PTR _EXFUN(_realloc_r,(struct _reent *, _PTR, size_t));
+_PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
+_PTR _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t));
+_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, _PTR));
+_PTR _EXFUN_NOTHROW(_realloc_r,(struct _reent *, _PTR, size_t));
_VOID _EXFUN(_mstats_r,(struct _reent *, char *));
#endif
int _EXFUN(_system_r,(struct _reent *, const char *));