Line 1... |
Line 1... |
/* ANSI and traditional C compatability macros
|
/* ANSI and traditional C compatability macros
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
|
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
|
|
2002, 2003, 2004, 2005, 2006, 2007, 2009
|
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
|
|
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
Line 112... |
Line 113... |
AND, DOTS, NOARGS. Don't use them. */
|
AND, DOTS, NOARGS. Don't use them. */
|
|
|
#ifndef _ANSIDECL_H
|
#ifndef _ANSIDECL_H
|
#define _ANSIDECL_H 1
|
#define _ANSIDECL_H 1
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
/* Every source file includes this file,
|
/* Every source file includes this file,
|
so they will all get the switch for lint. */
|
so they will all get the switch for lint. */
|
/* LINTLIBRARY */
|
/* LINTLIBRARY */
|
|
|
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
/* Using MACRO(x,y) in cpp #if conditionals does not work with some
|
Line 134... |
Line 139... |
gcc at all. */
|
gcc at all. */
|
#ifndef GCC_VERSION
|
#ifndef GCC_VERSION
|
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__)
|
#endif /* GCC_VERSION */
|
#endif /* GCC_VERSION */
|
|
|
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32) || (defined(__alpha) && defined(__cplusplus))
|
#if defined (__STDC__) || defined(__cplusplus) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
|
/* All known AIX compilers implement these things (but don't always
|
/* All known AIX compilers implement these things (but don't always
|
define __STDC__). The RISC/OS MIPS compiler defines these things
|
define __STDC__). The RISC/OS MIPS compiler defines these things
|
in SVR4 mode, but does not define __STDC__. */
|
in SVR4 mode, but does not define __STDC__. */
|
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
|
/* eraxxon@alumni.rice.edu: The Compaq C++ compiler, unlike many other
|
C++ compilers, does not define __STDC__, though it acts as if this
|
C++ compilers, does not define __STDC__, though it acts as if this
|
Line 171... |
Line 176... |
#undef signed
|
#undef signed
|
|
|
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
|
/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
|
it too, but it's not in C89. */
|
it too, but it's not in C89. */
|
#undef inline
|
#undef inline
|
#if __STDC_VERSION__ > 199901L
|
#if __STDC_VERSION__ > 199901L || defined(__cplusplus)
|
/* it's a keyword */
|
/* it's a keyword */
|
#else
|
#else
|
# if GCC_VERSION >= 2007
|
# if GCC_VERSION >= 2007
|
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
# define inline __inline__ /* __inline__ prevents -pedantic warnings */
|
# else
|
# else
|
Line 254... |
Line 259... |
# else
|
# else
|
# define ATTRIBUTE_MALLOC
|
# define ATTRIBUTE_MALLOC
|
# endif /* GNUC >= 2.96 */
|
# endif /* GNUC >= 2.96 */
|
#endif /* ATTRIBUTE_MALLOC */
|
#endif /* ATTRIBUTE_MALLOC */
|
|
|
/* Attributes on labels were valid as of gcc 2.93. */
|
/* Attributes on labels were valid as of gcc 2.93 and g++ 4.5. For
|
|
g++ an attribute on a label must be followed by a semicolon. */
|
#ifndef ATTRIBUTE_UNUSED_LABEL
|
#ifndef ATTRIBUTE_UNUSED_LABEL
|
# if (!defined (__cplusplus) && GCC_VERSION >= 2093)
|
# ifndef __cplusplus
|
|
# if GCC_VERSION >= 2093
|
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
|
# else
|
# else
|
# define ATTRIBUTE_UNUSED_LABEL
|
# define ATTRIBUTE_UNUSED_LABEL
|
# endif /* !__cplusplus && GNUC >= 2.93 */
|
# endif
|
#endif /* ATTRIBUTE_UNUSED_LABEL */
|
# else
|
|
# if GCC_VERSION >= 4005
|
|
# define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED ;
|
|
# else
|
|
# define ATTRIBUTE_UNUSED_LABEL
|
|
# endif
|
|
# endif
|
|
#endif
|
|
|
#ifndef ATTRIBUTE_UNUSED
|
#ifndef ATTRIBUTE_UNUSED
|
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
|
#endif /* ATTRIBUTE_UNUSED */
|
#endif /* ATTRIBUTE_UNUSED */
|
|
|
Line 388... |
Line 402... |
gcc 2.8. */
|
gcc 2.8. */
|
#if GCC_VERSION < 2008
|
#if GCC_VERSION < 2008
|
#define __extension__
|
#define __extension__
|
#endif
|
#endif
|
|
|
|
/* This is used to declare a const variable which should be visible
|
|
outside of the current compilation unit. Use it as
|
|
EXPORTED_CONST int i = 1;
|
|
This is because the semantics of const are different in C and C++.
|
|
"extern const" is permitted in C but it looks strange, and gcc
|
|
warns about it when -Wc++-compat is not used. */
|
|
#ifdef __cplusplus
|
|
#define EXPORTED_CONST extern const
|
|
#else
|
|
#define EXPORTED_CONST const
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
#endif /* ansidecl.h */
|
#endif /* ansidecl.h */
|
|
|
No newline at end of file
|
No newline at end of file
|