File: config.h

package info (click to toggle)
apt-cacher-ng 0.7.27-1~bpo70+1
  • links: PTS
  • area: main
  • in suites: wheezy-backports
  • size: 1,740 kB
  • sloc: cpp: 13,987; sh: 519; perl: 442; ansic: 414; makefile: 77
file content (67 lines) | stat: -rw-r--r-- 1,670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

#ifndef __CONFIG_H_
#define __CONFIG_H_

#include "acsyscap.h"

#define ACVERSION "0.7.27"

#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <climits>

// keep this consistently, for experiments with other STL implementations
#define MYSTD std
//#define MYSTD ustl
//#include <ustl.h>

#define MYMAP MYSTD::map

#ifdef HAVE_MEMORY_SPTR
#include <memory>
#define SMARTPTR_SPACE MYSTD
#elif defined HAVE_TR1_MEMORY
#include <tr1/memory>
#define SMARTPTR_SPACE MYSTD::tr1
#elif defined HAVE_BOOST_SMARTPTR
#include <boost/smart_ptr.hpp>
#define SMARTPTR_SPACE boost
#else
#error Unable to find smart pointer implementation, install Boost or recent compiler with STL containing TR1 components. Set BOOSTDIR in Makefile if needed.
#endif

#ifndef HAVE_ZLIB
#warning Zlib or its development files are not available. Install them (e.g. zlib1g-dev) and run "make clean". Gzip format support disabled.
#endif

#ifndef HAVE_LIBBZ2
#warning LibBz2 or its development files are not available. Install them (e.g. libbz2-dev) and run "make clean". Bzip2 format support disabled.
#endif

// make off_t be a 64 bit type
// added in Makefile... #define _FILE_OFFSET_BITS 64

#define SHARED_PTR SMARTPTR_SPACE::shared_ptr
#define INTRUSIVE_PTR SMARTPTR_SPACE::intrusive_ptr
#define WEAK_PTR SMARTPTR_SPACE::weak_ptr
#define SCOPED_PTR MYSTD::auto_ptr

#ifdef NO_EXCEPTIONS
#define MYTRY
#define MYCATCH(x) if(false)
#else
#define MYTRY try
#define MYCATCH catch
#endif

#ifndef PATH_MAX
#define PATH_MAX 4096
#endif

#define ENEMIESOFDOSFS "?[]\\=+<>:;#"

//! Time after which the pooled sockets are considered EOLed
#define TIME_SOCKET_EXPIRE_CLOSE 33

#endif // __CONFIG_H