nginx/src/core/ngx_config.h


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx, Inc.
 */


#ifndef _NGX_CONFIG_H_INCLUDED_
#define _NGX_CONFIG_H_INCLUDED_


#include <ngx_auto_headers.h>


#if defined __DragonFly__ && !defined __FreeBSD__
#define __FreeBSD__
#define __FreeBSD_version
#endif


#if (NGX_FREEBSD)
#include <ngx_freebsd_config.h>


#elif (NGX_LINUX)
#include <ngx_linux_config.h>


#elif (NGX_SOLARIS)
#include <ngx_solaris_config.h>


#elif (NGX_DARWIN)
#include <ngx_darwin_config.h>


#elif (NGX_WIN32)
#include <ngx_win32_config.h>


#else /* POSIX */
#include <ngx_posix_config.h>

#endif


#ifndef NGX_HAVE_SO_SNDLOWAT
#define NGX_HAVE_SO_SNDLOWAT
#endif


#if !(NGX_WIN32)

#define ngx_signal_helper(n)
#define ngx_signal_value(n)

#define ngx_random

/* TODO: #ifndef */
#define NGX_SHUTDOWN_SIGNAL
#define NGX_TERMINATE_SIGNAL
#define NGX_NOACCEPT_SIGNAL
#define NGX_RECONFIGURE_SIGNAL

#if (NGX_LINUXTHREADS)
#define NGX_REOPEN_SIGNAL
#define NGX_CHANGEBIN_SIGNAL
#else
#define NGX_REOPEN_SIGNAL
#define NGX_CHANGEBIN_SIGNAL
#endif

#define ngx_cdecl
#define ngx_libc_cdecl

#endif

ngx_int_t;
ngx_uint_t;
ngx_flag_t;


#define NGX_INT32_LEN
#define NGX_INT64_LEN

#if (NGX_PTR_SIZE == 4)
#define NGX_INT_T_LEN
#define NGX_MAX_INT_T_VALUE

#else
#define NGX_INT_T_LEN
#define NGX_MAX_INT_T_VALUE
#endif


#ifndef NGX_ALIGNMENT
#define NGX_ALIGNMENT
#endif

#define ngx_align(d, a)
#define ngx_align_ptr(p, a)


#define ngx_abort


/* TODO: platform specific: array[NGX_INVALID_ARRAY_INDEX] must cause SIGSEGV */
#define NGX_INVALID_ARRAY_INDEX


/* TODO: auto_conf: ngx_inline   inline __inline __inline__ */
#ifndef ngx_inline
#define ngx_inline
#endif

#ifndef INADDR_NONE  /* Solaris */
#define INADDR_NONE
#endif

#ifdef MAXHOSTNAMELEN
#define NGX_MAXHOSTNAMELEN
#else
#define NGX_MAXHOSTNAMELEN
#endif


#define NGX_MAX_UINT32_VALUE
#define NGX_MAX_INT32_VALUE


#if (NGX_COMPAT)

#define NGX_COMPAT_BEGIN
#define NGX_COMPAT_END

#else

#define NGX_COMPAT_BEGIN(slots)
#define NGX_COMPAT_END

#endif


#endif /* _NGX_CONFIG_H_INCLUDED_ */