jpayne@69: /* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */ jpayne@69: jpayne@69: /* Copyright (C) 1993-2009 Free Software Foundation, Inc. jpayne@69: jpayne@69: This file is part of the GNU Readline Library (Readline), a library jpayne@69: for reading lines of text with interactive input and history editing. jpayne@69: jpayne@69: Readline is free software: you can redistribute it and/or modify jpayne@69: it under the terms of the GNU General Public License as published by jpayne@69: the Free Software Foundation, either version 3 of the License, or jpayne@69: (at your option) any later version. jpayne@69: jpayne@69: Readline is distributed in the hope that it will be useful, jpayne@69: but WITHOUT ANY WARRANTY; without even the implied warranty of jpayne@69: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the jpayne@69: GNU General Public License for more details. jpayne@69: jpayne@69: You should have received a copy of the GNU General Public License jpayne@69: along with Readline. If not, see . jpayne@69: */ jpayne@69: jpayne@69: #if !defined (_RL_STDC_H_) jpayne@69: #define _RL_STDC_H_ jpayne@69: jpayne@69: /* Adapted from BSD /usr/include/sys/cdefs.h. */ jpayne@69: jpayne@69: /* A function can be defined using prototypes and compile on both ANSI C jpayne@69: and traditional C compilers with something like this: jpayne@69: extern char *func PARAMS((char *, char *, int)); */ jpayne@69: jpayne@69: #if !defined (PARAMS) jpayne@69: # if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) jpayne@69: # define PARAMS(protos) protos jpayne@69: # else jpayne@69: # define PARAMS(protos) () jpayne@69: # endif jpayne@69: #endif jpayne@69: jpayne@69: #ifndef __attribute__ jpayne@69: # if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) jpayne@69: # define __attribute__(x) jpayne@69: # endif jpayne@69: #endif jpayne@69: jpayne@69: /* Moved from config.h.in because readline.h:rl_message depends on these jpayne@69: defines. */ jpayne@69: #if defined (__STDC__) && defined (HAVE_STDARG_H) jpayne@69: # define PREFER_STDARG jpayne@69: # define USE_VARARGS jpayne@69: #else jpayne@69: # if defined (HAVE_VARARGS_H) jpayne@69: # define PREFER_VARARGS jpayne@69: # define USE_VARARGS jpayne@69: # endif jpayne@69: #endif jpayne@69: jpayne@69: #endif /* !_RL_STDC_H_ */