CHECK.c (1936B)
1 /* 2 * Copyright (c) 2004 Gunnar Ritter 3 * 4 * This software is provided 'as-is', without any express or implied 5 * warranty. In no event will the authors be held liable for any damages 6 * arising from the use of this software. 7 * 8 * Permission is granted to anyone to use this software for any purpose, 9 * including commercial applications, and to alter it and redistribute 10 * it freely, subject to the following restrictions: 11 * 12 * 1. The origin of this software must not be misrepresented; you must not 13 * claim that you wrote the original software. If you use this software 14 * in a product, an acknowledgment in the product documentation would be 15 * appreciated but is not required. 16 * 17 * 2. Altered source versions must be plainly marked as such, and must not be 18 * misrepresented as being the original software. 19 * 20 * 3. This notice may not be removed or altered from any source distribution. 21 */ 22 /* Sccsid @(#)CHECK.c 1.8 (gritter) 12/16/07 */ 23 24 #include <stdlib.h> 25 26 #ifdef __FreeBSD__ 27 #define NEED_ALLOCA_H 1 28 #define NEED_MALLOC_H 1 29 #define NEED_UTMPX_H 1 30 #endif 31 32 #ifdef __APPLE__ 33 #include <available.h> 34 #if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_OS_X_VERSION_10_5 35 #define NEED_ALLOCA_H 1 36 #endif 37 #define NEED_MALLOC_H 1 38 #define NEED_UTMPX_H 1 39 #endif 40 41 #ifdef __DragonFly__ 42 #define NEED_ALLOCA_H 1 43 #define NEED_MALLOC_H 1 44 #define NEED_UTMPX_H 1 45 #endif 46 47 #ifdef __OpenBSD__ 48 #define NEED_ALLOCA_H 1 49 #define NEED_MALLOC_H 1 50 #define NEED_UTMPX_H 1 51 #endif 52 53 #ifdef __NetBSD__ 54 #define NEED_ALLOCA_H 1 55 #define NEED_MALLOC_H 1 56 #define NEED_UTMPX_H 1 57 #endif 58 59 #ifdef __dietlibc__ 60 #define NEED_MALLOC_H 1 61 #define NEED_UTMPX_H 1 62 #endif 63 64 #ifdef __UCLIBC__ 65 #define NEED_UTMPX_H 1 66 #endif 67 68 #ifndef NEED_ALLOCA_H 69 #define NEED_ALLOCA_H 0 70 #endif 71 72 #ifndef NEED_MALLOC_H 73 #define NEED_MALLOC_H 0 74 #endif 75 76 #ifndef NEED_UTMPX_H 77 #define NEED_UTMPX_H 0 78 #endif 79 80 int alloca_h = NEED_ALLOCA_H; 81 int malloc_h = NEED_MALLOC_H; 82 int utmpx_h = NEED_UTMPX_H;