Deleted Added
full compact
defines.h (113908) defines.h (124208)
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
1#ifndef _DEFINES_H
2#define _DEFINES_H
3
25#ifndef _DEFINES_H
26#define _DEFINES_H
27
4/* $Id: defines.h,v 1.97 2003/01/24 00:50:32 djm Exp $ */
28/* $Id: defines.h,v 1.103 2003/09/16 01:52:19 dtucker Exp $ */
5
6
7/* Constants */
8
9#ifndef SHUT_RDWR
10enum
11{
12 SHUT_RD = 0, /* No more receptions. */

--- 170 unchanged lines hidden (view full) ---

183# endif
184#define __BIT_TYPES_DEFINED__
185#endif
186
187/* 64-bit types */
188#ifndef HAVE_INT64_T
189# if (SIZEOF_LONG_INT == 8)
190typedef long int int64_t;
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;
191# define HAVE_INT64_T 1
192# else
193# if (SIZEOF_LONG_LONG_INT == 8)
194typedef long long int int64_t;
215# else
216# if (SIZEOF_LONG_LONG_INT == 8)
217typedef long long int int64_t;
195# define HAVE_INT64_T 1
196# endif
197# endif
198#endif
199#ifndef HAVE_U_INT64_T
200# if (SIZEOF_LONG_INT == 8)
201typedef unsigned long int u_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;
202# define HAVE_U_INT64_T 1
203# else
204# if (SIZEOF_LONG_LONG_INT == 8)
205typedef unsigned long long int u_int64_t;
224# else
225# if (SIZEOF_LONG_LONG_INT == 8)
226typedef unsigned long long int u_int64_t;
206# define HAVE_U_INT64_T 1
207# endif
208# endif
209#endif
227# endif
228# endif
229#endif
210#if !defined(HAVE_LONG_LONG_INT) && (SIZEOF_LONG_LONG_INT == 8)
211# define HAVE_LONG_LONG_INT 1
212#endif
213
214#ifndef HAVE_U_CHAR
215typedef unsigned char u_char;
216# define HAVE_U_CHAR
217#endif /* HAVE_U_CHAR */
218
219#ifndef SIZE_T_MAX
220#define SIZE_T_MAX ULONG_MAX

--- 78 unchanged lines hidden (view full) ---

299# endif
300# define _PATH_STDPATH USER_PATH
301#endif
302
303#ifndef _PATH_STDPATH
304# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
305#endif
306
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
307#ifndef _PATH_DEVNULL
308# define _PATH_DEVNULL "/dev/null"
309#endif
310
311#ifndef MAIL_DIRECTORY
312# define MAIL_DIRECTORY "/var/spool/mail"
313#endif
314

--- 100 unchanged lines hidden (view full) ---

415#define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
416#endif
417
418/* Length of the space taken up by a padded control message of length len */
419#ifndef CMSG_SPACE
420#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
421#endif
422
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
423/* Function replacement / compatibility hacks */
424
425#if !defined(HAVE_GETADDRINFO) && (defined(HAVE_OGETADDRINFO) || defined(HAVE_NGETADDRINFO))
426# define HAVE_GETADDRINFO
427#endif
428
429#ifndef HAVE_GETOPT_OPTRESET
430# undef getopt

--- 51 unchanged lines hidden (view full) ---

482#endif
483
484#if !defined(HAVE___func__) && defined(HAVE___FUNCTION__)
485# define __func__ __FUNCTION__
486#elif !defined(HAVE___func__)
487# define __func__ ""
488#endif
489
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
490/*
491 * Define this to use pipes instead of socketpairs for communicating with the
492 * client program. Socketpairs do not seem to work on all systems.
493 *
494 * configure.ac sets this for a few OS's which are known to have problems
495 * but you may need to set it yourself
496 */
497/* #define USE_PIPES 1 */

--- 66 unchanged lines hidden ---
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 ---