1/* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17/* 18 * Note: 19 * This is the windows specific autoconf-like config file 20 * which unix would create at build time. 21 */ 22 23#ifdef WIN32 24 25#ifndef APR_PRIVATE_H 26#define APR_PRIVATE_H 27 28/* Include the public APR symbols, include our idea of the 'right' 29 * subset of the Windows.h header. This saves us repetition. 30 */ 31#include "apr.h" 32 33/* 34 * Add a _very_few_ declarations missing from the restricted set of headers 35 * (If this list becomes extensive, re-enable the required headers above!) 36 * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now 37 */ 38#ifndef SW_HIDE 39#define SW_HIDE 0 40#endif 41 42/* For the misc.h late-loaded dynamic symbols, we need some obscure types 43 * Avoid dragging in wtypes.h unless it's absolutely necessary [generally 44 * not with APR itself, until some GUI-related security is introduced.] 45 */ 46#ifndef _WIN32_WCE 47#define HAVE_ACLAPI 1 48#ifdef __wtypes_h__ 49#include <accctrl.h> 50#else 51#define __wtypes_h__ 52#include <accctrl.h> 53#undef __wtypes_h__ 54#endif 55#else 56#define HAVE_ACLAPI 0 57#endif 58 59#if APR_HAVE_SYS_TYPES_H 60#include <sys/types.h> 61#endif 62#if APR_HAVE_STDDEF_H 63#include <stddef.h> 64#endif 65#include <stdio.h> 66#if APR_HAVE_TIME_H 67#include <time.h> 68#endif 69 70/* Use this section to define all of the HAVE_FOO_H 71 * that are required to build properly. 72 */ 73#define HAVE_LIMITS_H 1 74#define HAVE_MALLOC_H 1 75#define HAVE_SIGNAL_H 1 76/* #define HAVE_STDDEF_H 1 why not? */ 77#define HAVE_STDLIB_H 1 78 79#define HAVE_STRICMP 1 80#define HAVE_STRNICMP 1 81#define HAVE_STRDUP 1 82#define HAVE_STRSTR 1 83#define HAVE_MEMCHR 1 84 85#define SIGHUP 1 86/* 2 is used for SIGINT on windows */ 87#define SIGQUIT 3 88/* 4 is used for SIGILL on windows */ 89#define SIGTRAP 5 90#define SIGIOT 6 91#define SIGBUS 7 92/* 8 is used for SIGFPE on windows */ 93#define SIGKILL 9 94#define SIGUSR1 10 95/* 11 is used for SIGSEGV on windows */ 96#define SIGUSR2 12 97#define SIGPIPE 13 98#define SIGALRM 14 99/* 15 is used for SIGTERM on windows */ 100#define SIGSTKFLT 16 101#define SIGCHLD 17 102#define SIGCONT 18 103#define SIGSTOP 19 104#define SIGTSTP 20 105/* 21 is used for SIGBREAK on windows */ 106/* 22 is used for SIGABRT on windows */ 107#define SIGTTIN 23 108#define SIGTTOU 24 109#define SIGURG 25 110#define SIGXCPU 26 111#define SIGXFSZ 27 112#define SIGVTALRM 28 113#define SIGPROF 29 114#define SIGWINCH 30 115#define SIGIO 31 116 117/* APR COMPATABILITY FUNCTIONS 118 * This section should be used to define functions and 119 * macros which are need to make Windows features look 120 * like POSIX features. 121 */ 122typedef void (Sigfunc)(int); 123 124#define sleep(t) Sleep((t) * 1000) 125 126#define SIZEOF_SHORT 2 127#define SIZEOF_INT 4 128#define SIZEOF_LONGLONG 8 129#define SIZEOF_CHAR 1 130#define SIZEOF_SSIZE_T SIZEOF_INT 131 132unsigned __stdcall SignalHandling(void *); 133int thread_ready(void); 134 135#if !APR_HAVE_ERRNO_H 136APR_DECLARE_DATA int errno; 137#define ENOSPC 1 138#endif 139 140#if APR_HAVE_IPV6 141#define HAVE_GETADDRINFO 1 142#define HAVE_GETNAMEINFO 1 143#endif 144 145/* MSVC 7.0 introduced _strtoi64 */ 146#if _MSC_VER >= 1300 && _INTEGRAL_MAX_BITS >= 64 && !defined(_WIN32_WCE) 147#define APR_INT64_STRFN _strtoi64 148#endif 149 150#if APR_HAS_LARGE_FILES 151#ifdef APR_INT64_STRFN 152#define APR_OFF_T_STRFN APR_INT64_STRFN 153#else 154#define APR_OFF_T_STRFN apr_strtoi64 155#endif 156#else 157#if defined(_WIN32_WCE) 158#define APR_OFF_T_STRFN strtol 159#else 160#define APR_OFF_T_STRFN strtoi 161#endif 162#endif 163 164/* used to check for DWORD overflow in 64bit compiles */ 165#define APR_DWORD_MAX 0xFFFFFFFFUL 166 167/* 168 * Include common private declarations. 169 */ 170#include "../apr_private_common.h" 171 172#endif /*APR_PRIVATE_H*/ 173#endif /*WIN32*/ 174