resetting manifest requested domain to floor
[platform/upstream/ccache.git] / system.h
1 /*
2  * Copyright (C) 2010 Joel Rosdahl
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License as published by the Free
6  * Software Foundation; either version 3 of the License, or (at your option)
7  * any later version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12  * more details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program; if not, write to the Free Software Foundation, Inc., 51
16  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18
19 #ifndef CCACHE_SYSTEM_H
20 #define CCACHE_SYSTEM_H
21
22 #include "config.h"
23
24 #include <sys/file.h>
25 #ifdef HAVE_SYS_MMAN_H
26 #include <sys/mman.h>
27 #endif
28 #include <sys/stat.h>
29 #include <sys/types.h>
30 #ifdef HAVE_SYS_WAIT_H
31 #include <sys/wait.h>
32 #endif
33
34 #include <assert.h>
35 #include <ctype.h>
36 #include <dirent.h>
37 #include <errno.h>
38 #include <fcntl.h>
39 #include <inttypes.h>
40 #include <stdarg.h>
41 #include <stddef.h>
42 #include <stdio.h>
43 #include <stdlib.h>
44 #include <string.h>
45 #include <unistd.h>
46 #include <time.h>
47 #include <utime.h>
48
49 #if !HAVE_VSNPRINTF
50   int rpl_vsnprintf(char *, size_t, const char *, va_list);
51   #define vsnprintf rpl_vsnprintf
52 #endif
53 #if !HAVE_SNPRINTF
54   int rpl_snprintf(char *, size_t, const char *, ...);
55   #define snprintf rpl_snprintf
56 #endif
57 #if !HAVE_VASPRINTF
58   int rpl_vasprintf(char **, const char *, va_list);
59   #define vasprintf rpl_vasprintf
60 #endif
61 #if !HAVE_ASPRINTF
62   int rpl_asprintf(char **, const char *, ...);
63   #define asprintf rpl_asprintf
64 #endif
65
66 #ifdef HAVE_STDBOOL_H
67 #  include <stdbool.h>
68 #else
69 #  ifndef HAVE__BOOL
70 #    ifdef __cplusplus
71 typedef bool _Bool;
72 #    else
73 #      define _Bool signed char
74 #    endif
75 #  endif
76 #  define bool _Bool
77 #  define false 0
78 #  define true 1
79 #  define __bool_true_false_are_defined 1
80 #endif
81
82 #endif /* CCACHE_SYSTEM_H */