Don't forget to include <stdint.h>.
[herrie-working.git] / herrie / src / stdinc.h
blobb48de3e920256b23cfa90b135e46cab95f5e8647
1 /*
2 * Copyright (c) 2006-2009 Ed Schouten <ed@80386.nl>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
27 /* Teach glibc a little lesson */
28 #ifndef _GNU_SOURCE
29 #define _GNU_SOURCE
30 #endif /* !_GNU_SOURCE */
31 #undef _FORTIFY_SOURCE
33 #include <sys/param.h>
34 #include <sys/stat.h>
35 #include <sys/types.h>
36 #include <ctype.h>
37 #include <errno.h>
38 #include <fcntl.h>
39 #ifdef BUILD_NLS
40 #include <locale.h>
41 #endif /* BUILD_NLS */
42 #include <regex.h>
43 #include <signal.h>
44 #include <stdint.h>
45 #include <stdio.h>
46 #include <stdlib.h>
47 #include <string.h>
48 #include <time.h>
49 #include <unistd.h>
51 #ifndef BUILD_DEBUG
52 #define G_DISABLE_ASSERT
53 #endif /* !BUILD_DEBUG */
55 #include <glib.h>
56 #ifdef BUILD_NLS
57 #include <glib/gi18n.h>
58 #else /* !BUILD_NLS */
59 #define _(str) str
60 #endif /* BUILD_NLS */
62 #ifdef G_THREADS_IMPL_POSIX
63 #include <pthread.h>
64 #endif /* G_THREADS_IMPL_POSIX */
65 #ifdef G_OS_UNIX
66 #include <pwd.h>
67 #ifdef BUILD_RES_INIT
68 #include <netinet/in.h>
69 #include <resolv.h>
70 #endif /* BUILD_RES_INIT */
71 #endif /* G_OS_UNIX */
73 #define CONFHOMEDIR "~" G_DIR_SEPARATOR_S "." APP_NAME G_DIR_SEPARATOR_S