source: OGRE/trunk/ogrenew/Dependencies/include/zzip/conf.h @ 657

Revision 657, 6.0 KB checked in by mattausch, 19 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1/*
2 * Here we postprocess autoconf generated prefix-config.h entries.
3 * This is generally for things like "off_t" which is left undefined
4 * in plain config.h if the host system does already have it but we do
5 * need the prefix variant - so we add here a #define _zzip_off_t off_t
6 *
7 * This file is supposed to only carry '#define's.
8 * See <zzip/types.h> for definitions that might be seen by the compiler.
9 *
10 * Author:
11 *      Guido Draheim <guidod@gmx.de>
12 *
13 *      Copyright (c) 2001,2002,2003,2004 Guido Draheim
14 *          All rights reserved,
15 *          use under the restrictions of the
16 *          Lesser GNU General Public License
17 *          or alternatively the restrictions
18 *          of the Mozilla Public License 1.1
19 */
20
21#ifndef _ZZIP_CONF_H
22#define _ZZIP_CONF_H 1
23
24#if !defined ZZIP_OMIT_CONFIG_H
25# if defined _MSC_VER || defined __BORLANDC__ || defined __WATCOMC__
26# include <zzip/_msvc.h>
27# elif defined ZZIP_1_H
28# include "zzip-1.h"
29# elif defined ZZIP_2_H
30# include "zzip-2.h"
31# elif defined ZZIP_3_H
32# include "zzip-3.h"
33# elif defined ZZIP_4_H
34# include "zzip-4.h"
35# elif defined ZZIP_5_H
36# include "zzip-5.h"
37# else /* autoconf generated */
38# include <zzip/_config.h>
39# endif
40#endif
41
42/* especially win32 platforms do not declare off_t so far - see zzip-msvc.h */
43#ifndef _zzip_off_t
44#ifdef   ZZIP_off_t
45#define _zzip_off_t ZZIP_off_t
46#else
47#define _zzip_off_t off_t
48#endif
49#endif
50
51/* currently unused, all current zziplib-users do have ansi-C94 compilers. */
52#ifndef _zzip_const
53#ifdef   ZZIP_const
54#define _zzip_const ZZIP_const
55#else
56#define _zzip_const const
57#endif
58#endif
59#ifndef _zzip_inline
60#ifdef   ZZIP_inline
61#define _zzip_inline ZZIP_inline
62#else
63#define _zzip_inline inline
64#endif
65#endif
66#ifndef _zzip_restrict
67#ifdef   ZZIP_restrict
68#define _zzip_restrict ZZIP_restrict
69#else
70#define _zzip_restrict restrict
71#endif
72#endif
73#ifndef _zzip_size_t
74#ifdef   ZZIP_size_t
75#define _zzip_size_t ZZIP_size_t
76#else
77#define _zzip_size_t size_t
78#endif
79#endif
80#ifndef _zzip_ssize_t
81#ifdef   ZZIP_ssize_t
82#define _zzip_ssize_t ZZIP_ssize_t
83#else
84#define _zzip_ssize_t ssize_t
85#endif
86#endif
87
88/* whether this library shall use a 64bit off_t largefile variant in 64on32: */
89/* (some exported names must be renamed to avoid bad calls after linking) */
90#if defined ZZIP_LARGEFILE_SENSITIVE
91# if _FILE_OFFSET_BITS+0 == 64
92# define  ZZIP_LARGEFILE_RENAME
93# elif defined  _LARGE_FILES    /* used on older AIX to get at 64bit off_t */
94# define  ZZIP_LARGEFILE_RENAME
95# elif defined  _ZZIP_LARGEFILE /* or simply use this one for zzip64 runs */
96# define  ZZIP_LARGEFILE_RENAME
97# endif
98#endif
99
100/* if the environment did not setup these for 64bit off_t largefile... */
101#ifdef   ZZIP_LARGEFILE_RENAME
102# ifndef      _FILE_OFFSET_BITS
103#  ifdef ZZIP__FILE_OFFSET_BITS /* == 64 */
104#  define     _FILE_OFFSET_BITS ZZIP__FILE_OFFSET_BITS
105#  endif
106# endif
107# ifndef      _LARGE_FILES
108#  ifdef ZZIP__LARGE_FILES /* == 1 */
109#  define     _LARGE_FILES ZZIP__LARGE_FILES
110#  endif
111# endif
112# ifndef      _LARGEFILE_SOURCE
113#  ifdef ZZIP__LARGEFILE_SOURCE /* == 1 */
114#  define     _LARGEFILE_SOURCE ZZIP__LARGEFILE_SOURCE
115#  endif
116# endif
117#endif
118
119#include <errno.h>
120
121/* mingw32msvc errno : would be in winsock.h */
122#ifndef EREMOTE
123#define EREMOTE ESPIPE
124#endif
125
126#ifndef ELOOP
127#if   defined EILSEQ
128#define ELOOP EILSEQ
129#else
130#define ELOOP ENOEXEC
131#endif
132#endif
133
134#if defined __WATCOMC__
135#undef  _zzip_inline
136#define _zzip_inline static
137#endif
138
139#if defined _MSC_VER || defined __WATCOMC__
140#include <io.h>
141#endif
142
143#ifdef _MSC_VER
144# if !__STDC__
145#  ifndef _zzip_lseek
146#  define _zzip_lseek _lseek
147#  endif
148#  ifndef _zzip_read
149#  define _zzip_read _read
150#  endif
151#  ifndef _zzip_write
152#  define _zzip_write _write
153#  endif
154#      if 0
155#  ifndef _zzip_stat
156#  define _zzip_stat _stat
157#  endif
158#      endif
159# endif /* !__STDC__ */
160#endif
161  /*MSVC*/
162
163#if defined _MSC_VER || defined __WATCOMC__
164#  ifndef strcasecmp
165#  define strcasecmp _stricmp
166#  endif
167#endif
168
169#  ifndef _zzip_lseek
170#  define _zzip_lseek lseek
171#  endif
172
173#  ifndef _zzip_read
174#  define _zzip_read  read
175#  endif
176
177#  ifndef _zzip_write
178#  define _zzip_write  write
179#  endif
180
181#      if 0
182#  ifndef _zzip_stat
183#  define _zzip_stat  stat
184#  endif
185#     endif
186
187
188#if defined __GNUC__ || defined __attribute__
189#define __zzip_attribute__(X) __attribute__(X)
190#else
191#define __zzip_attribute__(X)
192#endif
193
194#if defined ZZIP_EXPORTS || defined ZZIPLIB_EXPORTS
195# undef ZZIP_DLL
196#define ZZIP_DLL 1
197#endif
198
199/* based on zconf.h : */
200/* compile with -DZZIP_DLL for Windows DLL support */
201#if defined ZZIP_DLL
202#  if defined _WINDOWS || defined WINDOWS || defined _WIN32
203/*#  include <windows.h>*/
204#  endif
205#  if !defined _zzip_export && defined _MSC_VER && (defined WIN32 || defined _WIN32)
206#    define _zzip_export __declspec(dllexport) /*WINAPI*/
207#  endif
208#  if !defined _zzip_export && defined __BORLANDC__
209#    if __BORLANDC__ >= 0x0500 && defined WIN32
210#    include <windows.h>
211#    define _zzip_export __declspec(dllexport) /*WINAPI*/
212#    else
213#      if defined _Windows && defined __DLL__
214#      define _zzip_export _export
215#      endif
216#    endif
217#  endif
218#  if !defined _zzip_export && defined __GNUC__
219#    if defined __declspec
220#      define _zzip_export extern __declspec(dllexport)
221#    else
222#      define _zzip_export extern
223#    endif
224#  endif
225#  if !defined _zzip_export && defined __BEOS__
226#    define _zzip_export extern __declspec(export)
227#  endif
228#  if !defined _zzip_export && defined __WATCOMC__
229#    define _zzip_export extern __declspec(dllexport)
230#    define ZEXPORT __syscall
231#    define ZEXTERN extern
232#  endif
233#endif
234
235#if !defined _zzip_export
236#  if defined __GNUC__ /* || !defined HAVE_LIBZZIP */
237#  define _zzip_export extern
238#  elif defined __declspec || (defined _MSC_VER && defined ZZIP_DLL)
239#  define _zzip_export extern __declspec(dllimport)
240#  else
241#  define _zzip_export extern
242#  endif
243#endif
244
245#endif
246
247
Note: See TracBrowser for help on using the repository browser.