/* * Copyright (c) 1995, 1996 Gunther Schadow. All rights reserved. * * 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 * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef PG_CONFIG_H_ #define PG_CONFIG_H_ #include #include #include #ifndef CHARS_LEFT /* * The number of characters left in the read buffer of the FILE * structure. Try to figure it out from your "stdio.h" file. The * parameter in the following definition is a pointer to FILE * (FILE *fp). This one is just an example of how this function * might look. You most probably have to edit it. * See also HINT below. */ #define CHARS_LEFT(fp) (fp->_cnt) #endif /* You might not have the fpurge() function in stdio.h. This one * is just an example of how this function might look. You most * probably have to edit it. * * HINT: * The FILE structure usually is a linear buffer, i.e. it has a * BASE, a POINTER and a COUNTER. The BASE is a pointer to the * start of the buffer, the POINTER tells the actual position in * the buffer and the COUNTER tells how many character are still * left in the buffer. Hence the CHARS_LEFT macro above, that just * returns the COUNTER. * The fpurge() function here clears the buffer, discarding any * character that was left. The next read access will first read * a new buffer and reset the counter. Thus fpurge() will have to * set the COUNTER to 0 and the POINTER to the BASE, indicating that * there is no character left to be read and the buffer is empty. */ #ifdef __GNUC__ # define fpurge(fp) ({ (fp)->_ptr = (fp)->_base; (fp)->_cnt = 0; 0; }) #else # define fpurge(fp) (((fp)->_ptr = (fp)->_base) + ((fp)->_cnt = 0) ? 0 : 0) #endif #ifndef CXX_HAVE_BOOL /* * If your C++ compiler knows the `bool' type comment out the following * definition. Since you use GCC, this will alway be true and you don't * have to change this. */ #define CXX_HAVE_BOOL 1 #endif /* You might have to enable some of the declarations below, since may * operating system's *.h files forget them. Some even do not have * some of these implemented (e.g. HPUX 9 that lacks a sys_siglist) * See the config.mk for these cases. */ /* extern const char *const sys_errlist[]; /**/ /* extern int sys_nerr; /**/ /* extern const char *const sys_errlist[]; /**/ /* extern char *optarg; /**/ /* extern int optind; /**/ /************************************************************ * You should not have to change anything below this line */ #if __GNUG__ # if __GNUC_MINOR__ > 5 # ifdef CXX_HAVE_BOOL # undef CXX_HAVE_BOOL # endif # define CXX_HAVE_BOOL 1 # endif #endif #if !defined(__cplusplus) || !CXX_HAVE_BOOL typedef int bool; #endif typedef int result; #include #endif /* ! PG_CONFIG_H_ */