platform.h revision bdb611d182e5e7e1eca7b08aae735f8e5ac3995b
/**
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2014 - 2015 ForgeRock AS.
*/
#ifndef PLATFORM_H
#define PLATFORM_H
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <ws2ipdef.h>
#include <windns.h>
#include <iphlpapi.h>
#include <wincrypt.h>
#include <process.h>
#include <io.h>
#include <direct.h>
#include <fcntl.h>
#include <math.h>
#include <malloc.h>
#include <time.h>
#include <shlwapi.h>
#include <shellapi.h>
#if (_MSC_VER < 1900)
#endif
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
#define localtime_r(a,b) localtime_s(b,a)
#define SOCKLEN_T int
#define pid_t int
typedef long uid_t;
typedef long gid_t;
#if (_MSC_VER < 1800)
#endif
#ifndef S_ISDIR
#endif
#ifndef S_ISREG
#endif
#define FILE_PATH_SEP "\\"
#define AM_GLOBAL_PREFIX "Global\\"
#else /* _WIN32 */
#include <pthread.h>
#include <unistd.h>
#if defined(__sun) && !defined(_POSIX_C_SOURCE)
#define _POSIX_C_SOURCE 200112L
#else
#endif /* __sun, etc. */
#include <signal.h>
#include <netdb.h>
#include <fcntl.h>
#include <semaphore.h>
#include <ftw.h>
#include <dirent.h>
#include <dlfcn.h>
#include <pwd.h>
#include <grp.h>
#ifdef __APPLE__
#include <mach/semaphore.h>
#include <copyfile.h>
#else
#ifndef AIX
#include <sys/sendfile.h>
#endif
#endif /* __APPLE */
#define FILE_PATH_SEP "/"
#define AM_GLOBAL_PREFIX ""
#endif /* _WIN32 */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <stdarg.h>
#include <ctype.h>
#include <stdint.h>
#include <stddef.h>
#endif /* PLATFORM_H */