Blame ares_build.h

Packit 514978
#ifndef __CARES_BUILD_H
Packit 514978
#define __CARES_BUILD_H
Packit 514978
Packit 514978
Packit 514978
/* Copyright (C) 2009 - 2013 by Daniel Stenberg et al
Packit 514978
 *
Packit 514978
 * Permission to use, copy, modify, and distribute this software and its
Packit 514978
 * documentation for any purpose and without fee is hereby granted, provided
Packit 514978
 * that the above copyright notice appear in all copies and that both that
Packit 514978
 * copyright notice and this permission notice appear in supporting
Packit 514978
 * documentation, and that the name of M.I.T. not be used in advertising or
Packit 514978
 * publicity pertaining to distribution of the software without specific,
Packit 514978
 * written prior permission.  M.I.T. makes no representations about the
Packit 514978
 * suitability of this software for any purpose.  It is provided "as is"
Packit 514978
 * without express or implied warranty.
Packit 514978
 */
Packit 514978
Packit 514978
/* ================================================================ */
Packit 514978
/*               NOTES FOR CONFIGURE CAPABLE SYSTEMS                */
Packit 514978
/* ================================================================ */
Packit 514978
Packit 514978
/*
Packit 514978
 * NOTE 1:
Packit 514978
 * -------
Packit 514978
 *
Packit 514978
 * See file ares_build.h.in, run configure, and forget that this file
Packit 514978
 * exists it is only used for non-configure systems.
Packit 514978
 * But you can keep reading if you want ;-)
Packit 514978
 *
Packit 514978
 */
Packit 514978
Packit 514978
/* ================================================================ */
Packit 514978
/*                 NOTES FOR NON-CONFIGURE SYSTEMS                  */
Packit 514978
/* ================================================================ */
Packit 514978
Packit 514978
/*
Packit 514978
 * NOTE 1:
Packit 514978
 * -------
Packit 514978
 *
Packit 514978
 * Nothing in this file is intended to be modified or adjusted by the
Packit 514978
 * c-ares library user nor by the c-ares library builder.
Packit 514978
 *
Packit 514978
 * If you think that something actually needs to be changed, adjusted
Packit 514978
 * or fixed in this file, then, report it on the c-ares development
Packit 514978
 * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
Packit 514978
 *
Packit 514978
 * Try to keep one section per platform, compiler and architecture,
Packit 514978
 * otherwise, if an existing section is reused for a different one and
Packit 514978
 * later on the original is adjusted, probably the piggybacking one can
Packit 514978
 * be adversely changed.
Packit 514978
 *
Packit 514978
 * In order to differentiate between platforms/compilers/architectures
Packit 514978
 * use only compiler built in predefined preprocessor symbols.
Packit 514978
 *
Packit 514978
 * This header file shall only export symbols which are 'cares' or 'CARES'
Packit 514978
 * prefixed, otherwise public name space would be polluted.
Packit 514978
 *
Packit 514978
 * NOTE 2:
Packit 514978
 * -------
Packit 514978
 *
Packit 514978
 * Right now you might be staring at file ares_build.h.dist or ares_build.h,
Packit 514978
 * this is due to the following reason: file ares_build.h.dist is renamed
Packit 514978
 * to ares_build.h when the c-ares source code distribution archive file is
Packit 514978
 * created.
Packit 514978
 *
Packit 514978
 * File ares_build.h.dist is not included in the distribution archive.
Packit 514978
 * File ares_build.h is not present in the git tree.
Packit 514978
 *
Packit 514978
 * The distributed ares_build.h file is only intended to be used on systems
Packit 514978
 * which can not run the also distributed configure script.
Packit 514978
 *
Packit 514978
 * On systems capable of running the configure script, the configure process
Packit 514978
 * will overwrite the distributed ares_build.h file with one that is suitable
Packit 514978
 * and specific to the library being configured and built, which is generated
Packit 514978
 * from the ares_build.h.in template file.
Packit 514978
 *
Packit 514978
 * If you check out from git on a non-configure platform, you must run the
Packit 514978
 * appropriate buildconf* script to set up ares_build.h and other local files.
Packit 514978
 *
Packit 514978
 */
Packit 514978
Packit 514978
/* ================================================================ */
Packit 514978
/*  DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE  */
Packit 514978
/* ================================================================ */
Packit 514978
Packit 514978
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
Packit 514978
#  error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
Packit 514978
   Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
Packit 514978
#endif
Packit 514978
Packit 514978
/* ================================================================ */
Packit 514978
/*    EXTERNAL INTERFACE SETTINGS FOR NON-CONFIGURE SYSTEMS ONLY    */
Packit 514978
/* ================================================================ */
Packit 514978
Packit 514978
#if defined(__DJGPP__) || defined(__GO32__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__SALFORDC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__BORLANDC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__TURBOC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__WATCOMC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__POCC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__LCC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__SYMBIAN32__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
Packit 514978
Packit 514978
#elif defined(__MWERKS__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(_WIN32_WCE)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__MINGW32__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
#elif defined(__VMS)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T unsigned int
Packit 514978
Packit 514978
#elif defined(__OS400__)
Packit 514978
#  if defined(__ILEC400__)
Packit 514978
#    define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
Packit 514978
#    define CARES_PULL_SYS_TYPES_H      1
Packit 514978
#    define CARES_PULL_SYS_SOCKET_H     1
Packit 514978
#  endif
Packit 514978
Packit 514978
#elif defined(__MVS__)
Packit 514978
#  if defined(__IBMC__) || defined(__IBMCPP__)
Packit 514978
#    define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
Packit 514978
#    define CARES_PULL_SYS_TYPES_H      1
Packit 514978
#    define CARES_PULL_SYS_SOCKET_H     1
Packit 514978
#  endif
Packit 514978
Packit 514978
#elif defined(__370__)
Packit 514978
#  if defined(__IBMC__) || defined(__IBMCPP__)
Packit 514978
#    define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
Packit 514978
#    define CARES_PULL_SYS_TYPES_H      1
Packit 514978
#    define CARES_PULL_SYS_SOCKET_H     1
Packit 514978
#  endif
Packit 514978
Packit 514978
#elif defined(TPF)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
/* ===================================== */
Packit 514978
/*    KEEP MSVC THE PENULTIMATE ENTRY    */
Packit 514978
/* ===================================== */
Packit 514978
Packit 514978
#elif defined(_MSC_VER)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T int
Packit 514978
Packit 514978
/* ===================================== */
Packit 514978
/*    KEEP GENERIC GCC THE LAST ENTRY    */
Packit 514978
/* ===================================== */
Packit 514978
Packit 514978
#elif defined(__GNUC__)
Packit 514978
#  define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t
Packit 514978
#  define CARES_PULL_SYS_TYPES_H      1
Packit 514978
#  define CARES_PULL_SYS_SOCKET_H     1
Packit 514978
Packit 514978
#else
Packit 514978
#  error "Unknown non-configure build target!"
Packit 514978
   Error Compilation_aborted_Unknown_non_configure_build_target
Packit 514978
#endif
Packit 514978
Packit 514978
/* CARES_PULL_SYS_TYPES_H is defined above when inclusion of header file  */
Packit 514978
/* sys/types.h is required here to properly make type definitions below.  */
Packit 514978
#ifdef CARES_PULL_SYS_TYPES_H
Packit 514978
#  include <sys/types.h>
Packit 514978
#endif
Packit 514978
Packit 514978
/* CARES_PULL_SYS_SOCKET_H is defined above when inclusion of header file  */
Packit 514978
/* sys/socket.h is required here to properly make type definitions below.  */
Packit 514978
#ifdef CARES_PULL_SYS_SOCKET_H
Packit 514978
#  include <sys/socket.h>
Packit 514978
#endif
Packit 514978
Packit 514978
/* Data type definition of ares_socklen_t. */
Packit 514978
Packit 514978
#ifdef CARES_TYPEOF_ARES_SOCKLEN_T
Packit 514978
  typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
Packit 514978
#endif
Packit 514978
Packit 514978
/* Data type definition of ares_ssize_t. */
Packit 514978
#ifdef _WIN32
Packit 514978
#  ifdef _WIN64
Packit 514978
#    define CARES_TYPEOF_ARES_SSIZE_T __int64
Packit 514978
#  else
Packit 514978
#    define CARES_TYPEOF_ARES_SSIZE_T long
Packit 514978
#  endif
Packit 514978
#else
Packit 514978
#  define CARES_TYPEOF_ARES_SSIZE_T ssize_t;
Packit 514978
#endif
Packit 514978
Packit 514978
typedef CARES_TYPEOF_ARES_SSIZE_T ares_ssize_t;
Packit 514978
Packit 514978
#endif /* __CARES_BUILD_H */