/* $Id$ ***************************************************************************** * * File: fko_common.h * * Author: Damien S. Stuart * * Purpose: Common header for libfko source files. * * Copyright (C) 2008 Damien Stuart (dstuart@dstuart.org) * * License (GNU Public License): * * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * ***************************************************************************** */ #ifndef FKO_COMMON_H #define FKO_COMMON_H 1 #if HAVE_CONFIG_H #include "config.h" #endif #include #include #if STDC_HEADERS #include #include #elif HAVE_STRINGS_H #include #endif /*STDC_HEADERS*/ #if HAVE_UNISTD_H #include #endif #if HAVE_CTYPE_H #include /* Using this if isdigit() */ #else /* Fall-back does not account for locale */ #define isdigit(c) (c >= 48 && c <= 57) #endif /* Convenient macros for wrapping sections in 'extern "C" {' constructs. */ #ifdef __cplusplus #define BEGIN_C_DECLS extern "C" { #define END_C_DECLS } #else /* !__cplusplus */ #define BEGIN_C_DECLS #define END_C_DECLS #endif /* __cplusplus */ #include "fko_types.h" #include "fko_util.h" /* Try to cover for those that do not have bzero. */ #if !HAVE_BZERO && HAVE_MEMSET # define bzero(buf, bytes) ((void) memset (buf, 0, bytes)) #endif #endif /* FKO_COMMON_H */ /***EOF***/