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
|
#ifndef __CONFIG_H_
#define __CONFIG_H_
#include "acsyscap.h"
// safe fallbacks, should be defined by build system
#ifndef ACVERSION
#define ACVERSION "0.custom"
#endif
#ifndef CFGDIR
#define CFGDIR "/usr/local/etc/apt-cacher-ng"
#endif
#ifndef LIBDIR
#define LIBDIR "/usr/local/lib/apt-cacher-ng"
#endif
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <climits>
#include <memory>
// added in Makefile... #define _FILE_OFFSET_BITS 64
namespace acng
{
#define SHARED_PTR std::shared_ptr
#define INTRUSIVE_PTR std::intrusive_ptr
#define WEAK_PTR std::weak_ptr
#define SCOPED_PTR std::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
#define COMMA ,
#ifdef HAVE_SSL
#define IFSSLORFALSE(x) x
#define SSL_OPT_ARG(x) COMMA x
#else
#define IFSSLORFALSE(x) false
#define SSL_OPT_ARG(x)
#endif
}
#endif // __CONFIG_H
|