Use type alias to identify view settings and simplify option parsing
[tig.git] / compat / compat.h
blob69e51d9836993833caac06d2b3b34643d85db1d7
1 /* Copyright (c) 2006-2013 Jonas Fonseca <jonas.fonseca@gmail.com>
2 * Copyright (c) 2013 Drew Northup <n1xim.email@gmail.com>
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2 of
7 * the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #ifndef TIG_COMPAT_H
16 #define TIG_COMPAT_H
18 #ifndef HAVE_CONFIG_H
20 * Enable inclusion of header files checked by configure.
22 #define HAVE_STDINT_H
23 #define HAVE_STDLIB_H
24 #define HAVE_STRING_H
25 #define HAVE_SYS_TIME_H
26 #define HAVE_UNISTD_H
27 #endif
30 * XXX: Compatibility code must never be enabled by default.
33 #ifdef NO_MKSTEMPS
34 #define mkstemps compat_mkstemps
35 int compat_mkstemps(char *pattern, int suffix_len);
36 #endif
38 #ifdef NO_SETENV
39 #define setenv compat_setenv
40 int compat_setenv(const char *name, const char *value, int replace);
41 #endif
43 #ifdef NO_STRNDUP
44 #include <stddef.h>
45 #define strndup compat_strndup
46 char *compat_strndup(const char *s, size_t n);
47 #endif
49 #endif
51 /* vim: set ts=8 sw=8 noexpandtab: */