* data/default.proflie, data/Makefile.am, src/anjuta.c,
[anjuta-git-plugin.git] / tagmanager / general.h
blobfce17944f4bff4d3ee42cf67527a0387e5452923
1 /*
2 * $Id$
4 * Copyright (c) 1998-2003, Darren Hiebert
6 * This source code is released for free distribution under the terms of the
7 * GNU General Public License.
9 * Provides the general (non-ctags-specific) environment assumed by all.
11 #ifndef _GENERAL_H
12 #define _GENERAL_H
15 * INCLUDE FILES
17 #if defined (HAVE_CONFIG_H)
18 # include <config.h>
19 #elif defined (AMIGA)
20 # include "e_amiga.h"
21 #elif defined (DJGPP)
22 # include "e_djgpp.h"
23 #elif defined (macintosh)
24 # include "e_mac.h"
25 #elif defined (MSDOS) || defined (WIN32)
26 # include "e_msoft.h"
27 #elif defined (OS2)
28 # include "e_os2.h"
29 #elif defined (QDOS)
30 # include "e_qdos.h"
31 #elif defined (RISCOS)
32 # include "e_riscos.h"
33 #elif defined (__vms) || defined (VMS)
34 # include "e_vms.h"
35 # ifndef VMS
36 # define VMS 1
37 # endif
38 #endif
42 * MACROS
45 /* Define standard error destination
47 #ifndef errout
48 # define errout stderr
49 #endif
51 /* Define regex if supported */
52 #if (defined (HAVE_REGCOMP) && !defined (REGCOMP_BROKEN))
53 # define HAVE_REGEX 1
54 #endif
56 /* This is a helpful internal feature of later versions (> 2.7) of GCC
57 * to prevent warnings about unused variables.
59 #if (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)) && !(defined (__APPLE_CC__) || defined (__GNUG__))
60 # define __unused__ __attribute__((unused))
61 # define __printf__(s,f) __attribute__((format (printf, s, f)))
62 #else
63 # define __unused__
64 # define __printf__(s,f)
65 #endif
68 * Portability macros
70 #if !defined(HAVE_STRCASECMP) && !defined(strcasecmp)
71 # ifdef HAVE_STRICMP
72 # define strcasecmp(s1,s2) stricmp(s1,s2)
73 # else
74 # define strcasecmp(s1,s2) struppercmp(s1,s2)
75 # endif
76 #endif
78 #if !defined(HAVE_STRNCASECMP) && !defined(strncasecmp)
79 # ifdef HAVE_STRNICMP
80 # define strncasecmp(s1,s2,n) strnicmp(s1,s2,n)
81 # else
82 # define strncasecmp(s1,s2,n) strnuppercmp(s1,s2,n)
83 # endif
84 #endif
87 * DATA DECLARATIONS
90 #undef FALSE
91 #undef TRUE
92 #ifdef VAXC
93 typedef enum { FALSE, TRUE } booleanType;
94 typedef int boolean;
95 #else
96 # ifdef __cplusplus
97 typedef bool boolean;
98 #define FALSE false
99 #define TRUE true
100 # else
101 typedef enum { FALSE, TRUE } boolean;
102 # endif
103 #endif
105 #if ! defined (HAVE_FGETPOS) && ! defined (fpos_t)
106 # define fpos_t long
107 #endif
110 * FUNCTION PROTOTYPES
113 #if defined (NEED_PROTO_REMOVE) && defined (HAVE_REMOVE)
114 extern int remove (const char *);
115 #endif
117 #if defined (NEED_PROTO_UNLINK) && ! defined (HAVE_REMOVE)
118 extern void *unlink (const char *);
119 #endif
121 #ifdef NEED_PROTO_GETENV
122 extern char *getenv (const char *);
123 #endif
125 #endif /* _GENERAL_H */
127 /* vi:set tabstop=4 shiftwidth=4: */