#ifndef HEADER_CURL_CONFIG_OS400_H
#define HEADER_CURL_CONFIG_OS400_H
/***************************************************************************
 *                                  _   _ ____  _
 *  Project                     ___| | | |  _ \| |
 *                             / __| | | | |_) | |
 *                            | (__| |_| |  _ <| |___
 *                             \___|\___/|_| \_\_____|
 *
 * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
 *
 * This software is licensed as described in the file COPYING, which
 * you should have received as part of this distribution. The terms
 * are also available at https://curl.se/docs/copyright.html.
 *
 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
 * copies of the Software, and permit persons to whom the Software is
 * furnished to do so, under the terms of the COPYING file.
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
 * KIND, either express or implied.
 *
 * SPDX-License-Identifier: curl
 *
 ***************************************************************************/

/* ================================================================ */
/*                Hand crafted config file for OS/400               */
/* ================================================================ */

#pragma enum(int)

/* ---------------------------------------------------------------- */
/* Global configuration parameters: normally generated by autoconf. */
/* ---------------------------------------------------------------- */

/* Location of default ca bundle */
/* Use the system keyring as the default CA bundle. */
#define CURL_CA_BUNDLE          "/QIBM/UserData/ICSS/Cert/Server/DEFAULT.KDB"


/* Definition to make a library symbol externally visible. */
#define CURL_EXTERN_SYMBOL

/* cpu-machine-OS */
#ifndef CURL_OS
#define CURL_OS                 "OS/400"
#endif

/* Define to 1 if you have the alarm function. */
#define HAVE_ALARM              1

/* Define if you have the <arpa/inet.h> header file. */
#define HAVE_ARPA_INET_H        1

/* if you have <dirent.h> */
#define HAVE_DIRENT_H

/* Define to 1 if you have the fcntl function. */
#define HAVE_FCNTL              1

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H            1

/* Define to 1 if you have a working fcntl O_NONBLOCK function. */
#define HAVE_FCNTL_O_NONBLOCK   1

/* Define to 1 if you have the freeaddrinfo function. */
#define HAVE_FREEADDRINFO       1

/* Define to 1 if you have a working getaddrinfo function. */
#define HAVE_GETADDRINFO                1

/* Define to 1 if the getaddrinfo function is thread-safe. */
#define HAVE_GETADDRINFO_THREADSAFE     1

/* Define to 1 if you have the 'geteuid' function. */
#define HAVE_GETEUID                    1

/* Define to 1 if you have the gethostname function. */
#define HAVE_GETHOSTNAME        1

/* Define to 1 if you have the getpeername function. */
#define HAVE_GETPEERNAME        1

/* Define to 1 if you have the 'getppid' function. */
#define HAVE_GETPPID            1

/* Define to 1 if you have the 'getpwuid' function. */
#define HAVE_GETPWUID           1

/* Define to 1 if you have the getsockname function. */
#define HAVE_GETSOCKNAME        1

/* Define to 1 if you have the 'gettimeofday' function. */
#define HAVE_GETTIMEOFDAY       1

/* if you have GSS-API libraries */
#define HAVE_GSSAPI

/* Define to 1 if you have a working ioctl FIONBIO function. */
#define HAVE_IOCTL_FIONBIO      1

/* Define to 1 if you have a working ioctl SIOCGIFADDR function. */
#define HAVE_IOCTL_SIOCGIFADDR  1

/* Define to 1 if you have the lber.h header file. */
#define HAVE_LBER_H             1

/* Define to 1 if you have the ldap.h header file. */
#define HAVE_LDAP_H             1

/* Define to 1 if you have a working localtime_r function. */
#define HAVE_LOCALTIME_R        1

/* Define to 1 if you have the <netdb.h> header file. */
#define HAVE_NETDB_H            1

/* Define to 1 if you have the <netinet/in.h> header file. */
#define HAVE_NETINET_IN_H       1

/* Define to 1 if you have the <netinet/tcp.h> header file. */
#define HAVE_NETINET_TCP_H      1

/* Define to 1 if you have the <netinet/udp.h> header file. */
#define HAVE_NETINET_UDP_H      1

/* Define to 1 if you have the <net/if.h> header file. */
#define HAVE_NET_IF_H           1

/* if you have opendir */
#define HAVE_OPENDIR

/* Define to 1 if you have the 'pipe' function. */
#define HAVE_PIPE               1

/* Define to 1 if you have the <pwd.h> header file. */
#define HAVE_PWD_H              1

/* Define to 1 if you have the recv function. */
#define HAVE_RECV               1

/* Define to 1 if symbol `sa_family_t' exists */
#define HAVE_SA_FAMILY_T        1

/* Define to 1 if you have the select function. */
#define HAVE_SELECT             1

/* Define to 1 if you have the send function. */
#define HAVE_SEND               1

/* Define to 1 if you have the 'sendmsg' function. */
#define HAVE_SENDMSG            1

/* Define to 1 if you have the sigaction function. */
#define HAVE_SIGACTION          1

/* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
#define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1

/* Define to 1 if you have the socketpair function. */
#define HAVE_SOCKET             1

/* Define to 1 if you have the <stdbool.h> header file. */
#define HAVE_STDBOOL_H          1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H           1

/* Define to 1 if you have the <stdio.h> header file. */
#define HAVE_STDIO_H            1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H           1

/* Define to 1 if you have the stricmp function. */
#define HAVE_STRICMP            1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H          1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H           1

/* if struct sockaddr_storage is defined */
#define HAVE_STRUCT_SOCKADDR_STORAGE

/* Define to 1 if you have the timeval struct. */
#define HAVE_STRUCT_TIMEVAL     1

/* Define to 1 if you have the <sys/ioctl.h> header file. */
#define HAVE_SYS_IOCTL_H        1

/* Define to 1 if you have the <sys/param.h> header file. */
#define HAVE_SYS_PARAM_H        1

/* Define to 1 if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H     1

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H         1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H        1

/* Define to 1 if you have the <sys/un.h> header file. */
#define HAVE_SYS_UN_H           1

/* Define to 1 if you have the <unicode/uidna.h> header file. */
#define HAVE_UNICODE_UIDNA_H    1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H           1

/* Define to 1 if you have the 'utime' function. */
#define HAVE_UTIME              1

/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H            1

/* Size of curl_off_t in number of bytes */
#define SIZEOF_CURL_OFF_T       8

/* Size of curl_socket_t in number of bytes */
#define SIZEOF_CURL_SOCKET_T    4

/* Size of int in number of bytes */
#define SIZEOF_INT              4

/* Size of long in number of bytes */
#define SIZEOF_LONG             4

/* Size of off_t in number of bytes */
#define SIZEOF_OFF_T            8       /* _LARGE_FILES (*IFS64IO) version. */

/* Size of size_t in number of bytes */
#define SIZEOF_SIZE_T           4

/* Size of time_t in number of bytes */
#define SIZEOF_TIME_T           4

/* Define to 1 if all of the C89 standard headers exist (not just the ones
   required in a freestanding environment). This macro is provided for
   backward compatibility; new code need not use it. */
#define STDC_HEADERS            1

/* Define if you want to enable IPv6 support */
#define USE_IPV6

/* Use Unix domain sockets */
#define USE_UNIX_SOCKETS

/* Define to 1 if OS is AIX. */
#ifndef _ALL_SOURCE
#  undef _ALL_SOURCE
#endif

/* ---------------------------------------------------------------- */
/*          recv/send parameter types (see lib/functypes.h)         */
/* ---------------------------------------------------------------- */

/* int recv(int, char *, int, int); */
#define RECV_TYPE_ARG1          int
#define RECV_TYPE_ARG2          char *
#define RECV_TYPE_ARG3          int
#define RECV_TYPE_ARG4          int
#define RECV_TYPE_RETV          int

/* int send(int, char *, int, int); */
#define SEND_TYPE_ARG1          int
#define SEND_NONCONST_ARG2
#define SEND_TYPE_ARG2          char *
#define SEND_TYPE_ARG3          int
#define SEND_TYPE_ARG4          int
#define SEND_TYPE_RETV          int

/* ---------------------------------------------------------------- */
/*           Additional definitions specific to OS/400              */
/* ---------------------------------------------------------------- */

/* The <gssapi.h> header file is in the main system include directory. */
#define HAVE_GSSAPI_H

/* Define to use the OS/400 crypto library. */
#define USE_OS400CRYPTO

/* The following definition is required on OS/400 to enable strcmpi(),
   stricmp() and strdup(). */
#define __cplusplus__strings__

/* The following must be defined BEFORE system header files inclusion. */

#define __ptr128                       /* No teraspace. */
#define qadrt_use_fputc_inline         /* Generate fputc() wrapper inline. */
#define qadrt_use_fread_inline         /* Generate fread() wrapper inline. */
#define qadrt_use_fwrite_inline        /* Generate fwrite() wrapper inline. */

#endif /* HEADER_CURL_CONFIG_OS400_H */
