annotate lib/swig/swigwin-2.0.11/CCache/ccache.h @ 1983:5cd26f2c6904

small fix
author Ritor1
date Fri, 01 Nov 2013 17:29:49 +0600
parents b3009adc0e2f
children
rev   line source
1899
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
1 #include "ccache_swig_config.h"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
2
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
3 #define CCACHE_VERSION SWIG_VERSION
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
5 #ifndef _WIN32
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
6 #include "config.h"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
7 #else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
8 #include <sys/locking.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
9 #define PACKAGE_NAME "ccache-swig.exe"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
10 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
11
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
12 #include <stdio.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
13 #include <unistd.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
14 #include <stdlib.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
15 #include <errno.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
16 #include <sys/stat.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
17 #include <sys/types.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
18
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
19 #ifndef _WIN32
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
20 #include <sys/wait.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
21 #include <sys/mman.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
22 #else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
23 #define _WIN32_WINNT 0x0500
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
24 #include <windows.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
25 #include <shlobj.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
26 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
27
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
28 #include <sys/file.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
29 #include <fcntl.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
30 #include <time.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
31 #include <string.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
32 #include <ctype.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
33 #include <utime.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
34 #include <stdarg.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
35 #include <dirent.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
36 #include <limits.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
37 #ifdef HAVE_PWD_H
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
38 #include <pwd.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
39 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
40 #ifdef HAVE_SYS_TIME_H
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
41 #include <sys/time.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
42 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
43
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
44 #ifdef ENABLE_ZLIB
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
45 #include <zlib.h>
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
46 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
47
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
48 #define STATUS_NOTFOUND 3
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
49 #define STATUS_FATAL 4
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
50 #define STATUS_NOCACHE 5
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
51
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
52 #define MYNAME PACKAGE_NAME
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
53
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
54 #define LIMIT_MULTIPLE 0.8
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
55
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
56 /* default maximum cache size */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
57 #ifndef DEFAULT_MAXSIZE
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
58 #define DEFAULT_MAXSIZE (1000*1000)
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
59 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
60
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
61 /* file copy mode */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
62 #ifdef ENABLE_ZLIB
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
63 #define COPY_UNCOMPRESSED 0
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
64 #define COPY_FROM_CACHE 1
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
65 #define COPY_TO_CACHE 2
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
66 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
67
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
68 enum stats {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
69 STATS_NONE=0,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
70 STATS_STDOUT,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
71 STATS_STATUS,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
72 STATS_ERROR,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
73 STATS_TOCACHE,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
74 STATS_PREPROCESSOR,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
75 STATS_COMPILER,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
76 STATS_MISSING,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
77 STATS_CACHED,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
78 STATS_ARGS,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
79 STATS_LINK,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
80 STATS_NUMFILES,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
81 STATS_TOTALSIZE,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
82 STATS_MAXFILES,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
83 STATS_MAXSIZE,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
84 STATS_NOTC,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
85 STATS_DEVICE,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
86 STATS_NOINPUT,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
87 STATS_ENVIRONMMENT,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
88 STATS_MULTIPLE,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
89 STATS_CONFTEST,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
90 STATS_UNSUPPORTED,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
91 STATS_OUTSTDOUT,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
92
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
93 STATS_END
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
94 };
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
95
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
96 typedef unsigned uint32;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
97
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
98 #include "mdfour.h"
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
99
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
100 void hash_start(void);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
101 void hash_string(const char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
102 void hash_int(int x);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
103 void hash_file(const char *fname);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
104 char *hash_result(void);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
105 void hash_buffer(const char *s, int len);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
106
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
107 void cc_log(const char *format, ...);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
108 void fatal(const char *msg);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
109
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
110 void copy_fd(int fd_in, int fd_out);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
111 int safe_rename(const char* oldpath, const char* newpath);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
112 int move_file(const char *src, const char *dest);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
113 int test_if_compressed(const char *filename);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
114
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
115 int commit_to_cache(const char *src, const char *dest, int hardlink);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
116 int retrieve_from_cache(const char *src, const char *dest, int hardlink);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
117
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
118 int create_dir(const char *dir);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
119 int create_cachedirtag(const char *dir);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
120 void x_asprintf(char **ptr, const char *format, ...);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
121 char *x_strdup(const char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
122 void *x_realloc(void *ptr, size_t size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
123 void *x_malloc(size_t size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
124 void traverse(const char *dir, void (*fn)(const char *, struct stat *));
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
125 char *str_basename(const char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
126 char *dirname(char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
127 int lock_fd(int fd);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
128 size_t file_size(struct stat *st);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
129 int safe_open(const char *fname);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
130 char *x_realpath(const char *path);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
131 char *gnu_getcwd(void);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
132 int create_empty_file(const char *fname);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
133 const char *get_home_directory(void);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
134 int x_utimes(const char *filename);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
135 #ifdef _WIN32
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
136 void perror_win32(LPTSTR pszFunction);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
137 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
138
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
139 void stats_update(enum stats stat);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
140 void stats_zero(void);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
141 void stats_summary(void);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
142 void stats_tocache(size_t size, size_t numfiles);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
143 void stats_read(const char *stats_file, unsigned counters[STATS_END]);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
144 int stats_set_limits(long maxfiles, long maxsize);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
145 size_t value_units(const char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
146 void display_size(unsigned v);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
147 void stats_set_sizes(const char *dir, size_t num_files, size_t total_size);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
148
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
149 int unify_hash(const char *fname);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
150
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
151 #ifndef HAVE_VASPRINTF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
152 int vasprintf(char **, const char *, va_list );
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
153 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
154 #ifndef HAVE_ASPRINTF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
155 int asprintf(char **ptr, const char *format, ...);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
156 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
157
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
158 #ifndef HAVE_SNPRINTF
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
159 int snprintf(char *,size_t ,const char *, ...);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
160 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
161
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
162 void cleanup_dir(const char *dir, size_t maxfiles, size_t maxsize, size_t minfiles);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
163 void cleanup_all(const char *dir);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
164 void wipe_all(const char *dir);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
165
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
166 #ifdef _WIN32
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
167 char *argvtos(char **argv);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
168 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
169 int execute(char **argv,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
170 const char *path_stdout,
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
171 const char *path_stderr);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
172 char *find_executable(const char *name, const char *exclude_name);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
173 void display_execute_args(char **argv);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
174
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
175 typedef struct {
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
176 char **argv;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
177 int argc;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
178 } ARGS;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
179
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
180
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
181 ARGS *args_init(int , char **);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
182 void args_add(ARGS *args, const char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
183 void args_add_prefix(ARGS *args, const char *s);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
184 void args_pop(ARGS *args, int n);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
185 void args_strip(ARGS *args, const char *prefix);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
186 void args_remove_first(ARGS *args);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
187
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
188 extern int ccache_verbose;
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
189
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
190 #if HAVE_COMPAR_FN_T
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
191 #define COMPAR_FN_T __compar_fn_t
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
192 #else
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
193 typedef int (*COMPAR_FN_T)(const void *, const void *);
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
194 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
195
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
196 /* work with silly DOS binary open */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
197 #ifndef O_BINARY
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
198 #define O_BINARY 0
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
199 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
200
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
201 /* mkstemp() on some versions of cygwin don't handle binary files, so
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
202 override */
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
203 /* Seems okay in Cygwin 1.7.0
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
204 #ifdef __CYGWIN__
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
205 #undef HAVE_MKSTEMP
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
206 #endif
b3009adc0e2f Adding swig, gitignore, hgignore
Nomad
parents:
diff changeset
207 */