2010-08-29 09:54:08 +00:00
|
|
|
/*
|
2012-02-22 21:07:55 +00:00
|
|
|
* Copyright (C) 2010-2012 Joel Rosdahl
|
2010-08-29 09:54:08 +00:00
|
|
|
*
|
|
|
|
* 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 3 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., 51
|
|
|
|
* Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef CCACHE_SYSTEM_H
|
|
|
|
#define CCACHE_SYSTEM_H
|
|
|
|
|
|
|
|
#include "config.h"
|
2010-08-29 10:02:44 +00:00
|
|
|
|
2010-08-29 09:54:08 +00:00
|
|
|
#include <sys/file.h>
|
2010-08-29 10:02:44 +00:00
|
|
|
#ifdef HAVE_SYS_MMAN_H
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#endif
|
2010-08-29 09:54:08 +00:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/types.h>
|
2010-08-29 10:02:44 +00:00
|
|
|
#ifdef HAVE_SYS_WAIT_H
|
|
|
|
#include <sys/wait.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <dirent.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <fcntl.h>
|
2010-08-29 09:54:08 +00:00
|
|
|
#include <inttypes.h>
|
2011-07-16 21:25:31 +00:00
|
|
|
#include <limits.h>
|
2010-08-29 09:54:08 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <unistd.h>
|
2010-08-29 10:02:44 +00:00
|
|
|
#include <time.h>
|
|
|
|
#include <utime.h>
|
2010-08-29 09:54:08 +00:00
|
|
|
|
2012-02-22 21:07:55 +00:00
|
|
|
extern char **environ;
|
|
|
|
|
2010-11-17 20:20:24 +00:00
|
|
|
#if !HAVE_VSNPRINTF
|
|
|
|
int rpl_vsnprintf(char *, size_t, const char *, va_list);
|
2010-11-18 17:22:06 +00:00
|
|
|
#define vsnprintf rpl_vsnprintf
|
2010-11-17 20:20:24 +00:00
|
|
|
#endif
|
|
|
|
#if !HAVE_SNPRINTF
|
|
|
|
int rpl_snprintf(char *, size_t, const char *, ...);
|
2010-11-18 17:22:06 +00:00
|
|
|
#define snprintf rpl_snprintf
|
2010-11-17 20:20:24 +00:00
|
|
|
#endif
|
|
|
|
#if !HAVE_VASPRINTF
|
|
|
|
int rpl_vasprintf(char **, const char *, va_list);
|
2010-11-18 17:22:06 +00:00
|
|
|
#define vasprintf rpl_vasprintf
|
2010-11-17 20:20:24 +00:00
|
|
|
#endif
|
|
|
|
#if !HAVE_ASPRINTF
|
|
|
|
int rpl_asprintf(char **, const char *, ...);
|
2010-11-18 17:22:06 +00:00
|
|
|
#define asprintf rpl_asprintf
|
2010-11-17 20:20:24 +00:00
|
|
|
#endif
|
|
|
|
|
2010-08-29 10:09:23 +00:00
|
|
|
#ifdef HAVE_STDBOOL_H
|
|
|
|
# include <stdbool.h>
|
|
|
|
#else
|
|
|
|
# ifndef HAVE__BOOL
|
|
|
|
# ifdef __cplusplus
|
|
|
|
typedef bool _Bool;
|
|
|
|
# else
|
|
|
|
# define _Bool signed char
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
# define bool _Bool
|
|
|
|
# define false 0
|
|
|
|
# define true 1
|
|
|
|
# define __bool_true_false_are_defined 1
|
|
|
|
#endif
|
|
|
|
|
2010-08-29 09:54:08 +00:00
|
|
|
#endif /* CCACHE_SYSTEM_H */
|