1/* 2 * Copyright (c) 1999-2003 Damien Miller. All rights reserved. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 |
25#ifndef _DEFINES_H 26#define _DEFINES_H 27 |
28/* $Id: defines.h,v 1.103 2003/09/16 01:52:19 dtucker Exp $ */ |
29 30 31/* Constants */ 32 33#ifndef SHUT_RDWR 34enum 35{ 36 SHUT_RD = 0, /* No more receptions. */ --- 170 unchanged lines hidden (view full) --- 207# endif 208#define __BIT_TYPES_DEFINED__ 209#endif 210 211/* 64-bit types */ 212#ifndef HAVE_INT64_T 213# if (SIZEOF_LONG_INT == 8) 214typedef long int int64_t; |
215# else 216# if (SIZEOF_LONG_LONG_INT == 8) 217typedef long long int int64_t; |
218# endif 219# endif 220#endif 221#ifndef HAVE_U_INT64_T 222# if (SIZEOF_LONG_INT == 8) 223typedef unsigned long int u_int64_t; |
224# else 225# if (SIZEOF_LONG_LONG_INT == 8) 226typedef unsigned long long int u_int64_t; |
227# endif 228# endif 229#endif |
230 231#ifndef HAVE_U_CHAR 232typedef unsigned char u_char; 233# define HAVE_U_CHAR 234#endif /* HAVE_U_CHAR */ 235 236#ifndef SIZE_T_MAX 237#define SIZE_T_MAX ULONG_MAX --- 78 unchanged lines hidden (view full) --- 316# endif 317# define _PATH_STDPATH USER_PATH 318#endif 319 320#ifndef _PATH_STDPATH 321# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin" 322#endif 323 |
324#ifndef SUPERUSER_PATH 325# define SUPERUSER_PATH _PATH_STDPATH 326#endif 327 |
328#ifndef _PATH_DEVNULL 329# define _PATH_DEVNULL "/dev/null" 330#endif 331 332#ifndef MAIL_DIRECTORY 333# define MAIL_DIRECTORY "/var/spool/mail" 334#endif 335 --- 100 unchanged lines hidden (view full) --- 436#define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) 437#endif 438 439/* Length of the space taken up by a padded control message of length len */ 440#ifndef CMSG_SPACE 441#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) 442#endif 443 |
444/* given pointer to struct cmsghdr, return pointer to data */ 445#ifndef CMSG_DATA 446#define CMSG_DATA(cmsg) ((u_char *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr))) 447#endif /* CMSG_DATA */ 448 449/* 450 * RFC 2292 requires to check msg_controllen, in case that the kernel returns 451 * an empty list for some reasons. 452 */ 453#ifndef CMSG_FIRSTHDR 454#define CMSG_FIRSTHDR(mhdr) \ 455 ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \ 456 (struct cmsghdr *)(mhdr)->msg_control : \ 457 (struct cmsghdr *)NULL) 458#endif /* CMSG_FIRSTHDR */ 459 460 |
461/* Function replacement / compatibility hacks */ 462 463#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO)) 464# define HAVE_GETADDRINFO 465#endif 466 467#ifndef HAVE_GETOPT_OPTRESET 468# undef getopt --- 51 unchanged lines hidden (view full) --- 520#endif 521 522#if !defined(HAVE___func__) && defined(HAVE___FUNCTION__) 523# define __func__ __FUNCTION__ 524#elif !defined(HAVE___func__) 525# define __func__ "" 526#endif 527 |
528#if defined(KRB5) && !defined(HEIMDAL) 529# define krb5_get_err_text(context,code) error_message(code) 530#endif 531 |
532/* 533 * Define this to use pipes instead of socketpairs for communicating with the 534 * client program. Socketpairs do not seem to work on all systems. 535 * 536 * configure.ac sets this for a few OS's which are known to have problems 537 * but you may need to set it yourself 538 */ 539/* #define USE_PIPES 1 */ --- 66 unchanged lines hidden --- |