diff options
author | Russ Allbery <rra@stanford.edu> | 2008-04-24 02:02:49 +0000 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2008-04-24 02:02:49 +0000 |
commit | 92ff7f21ad0b167f8d742a9d7b5f93704a57619c (patch) | |
tree | 7adae5f227b6463e07d5cd0f1dab82b7f1c6be47 /system.h | |
parent | 34c58f9471b3df4fa8b719b3c3534940ba5cfe1b (diff) |
Major coding style cleanup. Updated all shared code from my other
projects.
The configure option requesting AFS kaserver support (and thus
building kasetkey) is now --with-kaserver instead of --with-afs.
If KRB5_CONFIG was explicitly set in the environment, don't use a
different krb5-config based on --with-krb4 or --with-krb5. If
krb5-config isn't executable, don't use it. This allows one to
force library probing by setting KRB5_CONFIG to point to a
nonexistent file.
Sanity-check the results of krb5-config before proceeding and error
out in configure if they don't work.
Stop setting Stanford-specific compile-time defaults for the wallet
server and port.
Diffstat (limited to 'system.h')
-rw-r--r-- | system.h | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/system.h b/system.h deleted file mode 100644 index 0650a2d..0000000 --- a/system.h +++ /dev/null @@ -1,95 +0,0 @@ -/* $Id$ -** -** Declarations of routines and variables in the C library. Including this -** file is the equivalent of including all of the following headers, -** portably: -** -** #include <sys/types.h> -** #include <stdarg.h> -** #include <stdio.h> -** #include <stdlib.h> -** #include <stddef.h> -** #include <string.h> -** #include <unistd.h> -** -** Missing functions are provided via #define or prototyped if available from -** the util helper library. Also provides some standard #defines. -** -** Written by Russ Allbery <rra@stanford.edu> -** Copyright 2006, 2007 Board of Trustees, Leland Stanford Jr. University -** -** See LICENSE for licensing terms. -*/ - -#ifndef SYSTEM_H -#define SYSTEM_H 1 - -/* Make sure we have our configuration information. */ -#include <config.h> - -/* A set of standard ANSI C headers. We don't care about pre-ANSI systems. */ -#include <stdarg.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <sys/types.h> -#include <string.h> -#include <unistd.h> - -/* __attribute__ is available in gcc 2.5 and later, but only with gcc 2.7 - could you use the __format__ form of the attributes, which is what we use - (to avoid confusion with other macros). */ -#ifndef __attribute__ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -# define __attribute__(spec) /* empty */ -# endif -#endif - -/* BEGIN_DECLS is used at the beginning of declarations so that C++ - compilers don't mangle their names. END_DECLS is used at the end. */ -#undef BEGIN_DECLS -#undef END_DECLS -#ifdef __cplusplus -# define BEGIN_DECLS extern "C" { -# define END_DECLS } -#else -# define BEGIN_DECLS /* empty */ -# define END_DECLS /* empty */ -#endif - -BEGIN_DECLS - -/* Provide prototypes for functions not declared in system headers. Use the - HAVE_DECL macros for those functions that may be prototyped but - implemented incorrectly or implemented without a prototype. */ -#if !HAVE_ASPRINTF -extern int asprintf(char **, const char *, ...); -extern int vasprintf(char **, const char *, va_list); -#endif -#if !HAVE_DECL_SNPRINTF -extern int snprintf(char *, size_t, const char *, ...) - __attribute__((__format__(printf, 3, 4))); -#endif -#if !HAVE_DECL_VSNPRINTF -extern int vsnprintf(char *, size_t, const char *, va_list); -#endif -#if !HAVE_STRLCAT -extern size_t strlcat(char *, const char *, size_t); -#endif -#if !HAVE_STRLCPY -extern size_t strlcpy(char *, const char *, size_t); -#endif - -END_DECLS - -/* C99 requires va_copy. Older versions of GCC provide __va_copy. Per the - Autoconf manual, memcpy is a generally portable fallback. */ -#ifndef va_copy -# ifdef __va_copy -# define va_copy(d, s) __va_copy((d), (s)) -# else -# define va_copy(d, s) memcpy(&(d), &(s), sizeof(va_list)) -# endif -#endif - -#endif /* !SYSTEM_H */ |