1ebfedea0SLionel Sambuc /* e_os2.h */ 2ebfedea0SLionel Sambuc /* ==================================================================== 3ebfedea0SLionel Sambuc * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. 4ebfedea0SLionel Sambuc * 5ebfedea0SLionel Sambuc * Redistribution and use in source and binary forms, with or without 6ebfedea0SLionel Sambuc * modification, are permitted provided that the following conditions 7ebfedea0SLionel Sambuc * are met: 8ebfedea0SLionel Sambuc * 9ebfedea0SLionel Sambuc * 1. Redistributions of source code must retain the above copyright 10ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer. 11ebfedea0SLionel Sambuc * 12ebfedea0SLionel Sambuc * 2. Redistributions in binary form must reproduce the above copyright 13ebfedea0SLionel Sambuc * notice, this list of conditions and the following disclaimer in 14ebfedea0SLionel Sambuc * the documentation and/or other materials provided with the 15ebfedea0SLionel Sambuc * distribution. 16ebfedea0SLionel Sambuc * 17ebfedea0SLionel Sambuc * 3. All advertising materials mentioning features or use of this 18ebfedea0SLionel Sambuc * software must display the following acknowledgment: 19ebfedea0SLionel Sambuc * "This product includes software developed by the OpenSSL Project 20ebfedea0SLionel Sambuc * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21ebfedea0SLionel Sambuc * 22ebfedea0SLionel Sambuc * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23ebfedea0SLionel Sambuc * endorse or promote products derived from this software without 24ebfedea0SLionel Sambuc * prior written permission. For written permission, please contact 25ebfedea0SLionel Sambuc * openssl-core@openssl.org. 26ebfedea0SLionel Sambuc * 27ebfedea0SLionel Sambuc * 5. Products derived from this software may not be called "OpenSSL" 28ebfedea0SLionel Sambuc * nor may "OpenSSL" appear in their names without prior written 29ebfedea0SLionel Sambuc * permission of the OpenSSL Project. 30ebfedea0SLionel Sambuc * 31ebfedea0SLionel Sambuc * 6. Redistributions of any form whatsoever must retain the following 32ebfedea0SLionel Sambuc * acknowledgment: 33ebfedea0SLionel Sambuc * "This product includes software developed by the OpenSSL Project 34ebfedea0SLionel Sambuc * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35ebfedea0SLionel Sambuc * 36ebfedea0SLionel Sambuc * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37ebfedea0SLionel Sambuc * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38ebfedea0SLionel Sambuc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39ebfedea0SLionel Sambuc * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40ebfedea0SLionel Sambuc * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41ebfedea0SLionel Sambuc * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42ebfedea0SLionel Sambuc * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43ebfedea0SLionel Sambuc * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44ebfedea0SLionel Sambuc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45ebfedea0SLionel Sambuc * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46ebfedea0SLionel Sambuc * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47ebfedea0SLionel Sambuc * OF THE POSSIBILITY OF SUCH DAMAGE. 48ebfedea0SLionel Sambuc * ==================================================================== 49ebfedea0SLionel Sambuc * 50ebfedea0SLionel Sambuc * This product includes cryptographic software written by Eric Young 51ebfedea0SLionel Sambuc * (eay@cryptsoft.com). This product includes software written by Tim 52ebfedea0SLionel Sambuc * Hudson (tjh@cryptsoft.com). 53ebfedea0SLionel Sambuc * 54ebfedea0SLionel Sambuc */ 55ebfedea0SLionel Sambuc 56ebfedea0SLionel Sambuc #include <openssl/opensslconf.h> 57ebfedea0SLionel Sambuc 58ebfedea0SLionel Sambuc #ifndef HEADER_E_OS2_H 59ebfedea0SLionel Sambuc # define HEADER_E_OS2_H 60ebfedea0SLionel Sambuc 61ebfedea0SLionel Sambuc #ifdef __cplusplus 62ebfedea0SLionel Sambuc extern "C" { 63ebfedea0SLionel Sambuc #endif 64ebfedea0SLionel Sambuc 65ebfedea0SLionel Sambuc /****************************************************************************** 66ebfedea0SLionel Sambuc * Detect operating systems. This probably needs completing. 67ebfedea0SLionel Sambuc * The result is that at least one OPENSSL_SYS_os macro should be defined. 68ebfedea0SLionel Sambuc * However, if none is defined, Unix is assumed. 69ebfedea0SLionel Sambuc **/ 70ebfedea0SLionel Sambuc 71ebfedea0SLionel Sambuc # define OPENSSL_SYS_UNIX 72ebfedea0SLionel Sambuc 73*0a6a1f1dSLionel Sambuc /* ---------------------- Macintosh, before MacOS X ----------------------- */ 74ebfedea0SLionel Sambuc # if defined(__MWERKS__) && defined(macintosh) || defined(OPENSSL_SYSNAME_MAC) 75ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 76ebfedea0SLionel Sambuc # define OPENSSL_SYS_MACINTOSH_CLASSIC 77ebfedea0SLionel Sambuc # endif 78ebfedea0SLionel Sambuc 79*0a6a1f1dSLionel Sambuc /* ---------------------- NetWare ----------------------------------------- */ 80ebfedea0SLionel Sambuc # if defined(NETWARE) || defined(OPENSSL_SYSNAME_NETWARE) 81ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 82ebfedea0SLionel Sambuc # define OPENSSL_SYS_NETWARE 83ebfedea0SLionel Sambuc # endif 84ebfedea0SLionel Sambuc 85*0a6a1f1dSLionel Sambuc /* --------------------- Microsoft operating systems ---------------------- */ 86ebfedea0SLionel Sambuc 87*0a6a1f1dSLionel Sambuc /* 88*0a6a1f1dSLionel Sambuc * Note that MSDOS actually denotes 32-bit environments running on top of 89*0a6a1f1dSLionel Sambuc * MS-DOS, such as DJGPP one. 90*0a6a1f1dSLionel Sambuc */ 91ebfedea0SLionel Sambuc # if defined(OPENSSL_SYSNAME_MSDOS) 92ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 93ebfedea0SLionel Sambuc # define OPENSSL_SYS_MSDOS 94ebfedea0SLionel Sambuc # endif 95ebfedea0SLionel Sambuc 96*0a6a1f1dSLionel Sambuc /* 97*0a6a1f1dSLionel Sambuc * For 32 bit environment, there seems to be the CygWin environment and then 98*0a6a1f1dSLionel Sambuc * all the others that try to do the same thing Microsoft does... 99*0a6a1f1dSLionel Sambuc */ 100ebfedea0SLionel Sambuc # if defined(OPENSSL_SYSNAME_UWIN) 101ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 102ebfedea0SLionel Sambuc # define OPENSSL_SYS_WIN32_UWIN 103ebfedea0SLionel Sambuc # else 104ebfedea0SLionel Sambuc # if defined(__CYGWIN32__) || defined(OPENSSL_SYSNAME_CYGWIN32) 105ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 106ebfedea0SLionel Sambuc # define OPENSSL_SYS_WIN32_CYGWIN 107ebfedea0SLionel Sambuc # else 108ebfedea0SLionel Sambuc # if defined(_WIN32) || defined(OPENSSL_SYSNAME_WIN32) 109ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 110ebfedea0SLionel Sambuc # define OPENSSL_SYS_WIN32 111ebfedea0SLionel Sambuc # endif 112*0a6a1f1dSLionel Sambuc # if defined(_WIN64) || defined(OPENSSL_SYSNAME_WIN64) 113*0a6a1f1dSLionel Sambuc # undef OPENSSL_SYS_UNIX 114*0a6a1f1dSLionel Sambuc # if !defined(OPENSSL_SYS_WIN64) 115*0a6a1f1dSLionel Sambuc # define OPENSSL_SYS_WIN64 116*0a6a1f1dSLionel Sambuc # endif 117*0a6a1f1dSLionel Sambuc # endif 118ebfedea0SLionel Sambuc # if defined(OPENSSL_SYSNAME_WINNT) 119ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 120ebfedea0SLionel Sambuc # define OPENSSL_SYS_WINNT 121ebfedea0SLionel Sambuc # endif 122ebfedea0SLionel Sambuc # if defined(OPENSSL_SYSNAME_WINCE) 123ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 124ebfedea0SLionel Sambuc # define OPENSSL_SYS_WINCE 125ebfedea0SLionel Sambuc # endif 126ebfedea0SLionel Sambuc # endif 127ebfedea0SLionel Sambuc # endif 128ebfedea0SLionel Sambuc 129ebfedea0SLionel Sambuc /* Anything that tries to look like Microsoft is "Windows" */ 130*0a6a1f1dSLionel Sambuc # if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN64) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE) 131ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 132ebfedea0SLionel Sambuc # define OPENSSL_SYS_WINDOWS 133ebfedea0SLionel Sambuc # ifndef OPENSSL_SYS_MSDOS 134ebfedea0SLionel Sambuc # define OPENSSL_SYS_MSDOS 135ebfedea0SLionel Sambuc # endif 136ebfedea0SLionel Sambuc # endif 137ebfedea0SLionel Sambuc 138*0a6a1f1dSLionel Sambuc /* 139*0a6a1f1dSLionel Sambuc * DLL settings. This part is a bit tough, because it's up to the 140*0a6a1f1dSLionel Sambuc * application implementor how he or she will link the application, so it 141*0a6a1f1dSLionel Sambuc * requires some macro to be used. 142*0a6a1f1dSLionel Sambuc */ 143ebfedea0SLionel Sambuc # ifdef OPENSSL_SYS_WINDOWS 144ebfedea0SLionel Sambuc # ifndef OPENSSL_OPT_WINDLL 145*0a6a1f1dSLionel Sambuc # if defined(_WINDLL) /* This is used when building OpenSSL to 146*0a6a1f1dSLionel Sambuc * indicate that DLL linkage should be used */ 147ebfedea0SLionel Sambuc # define OPENSSL_OPT_WINDLL 148ebfedea0SLionel Sambuc # endif 149ebfedea0SLionel Sambuc # endif 150ebfedea0SLionel Sambuc # endif 151ebfedea0SLionel Sambuc 152*0a6a1f1dSLionel Sambuc /* ------------------------------- OpenVMS -------------------------------- */ 153ebfedea0SLionel Sambuc # if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYSNAME_VMS) 154ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 155ebfedea0SLionel Sambuc # define OPENSSL_SYS_VMS 156ebfedea0SLionel Sambuc # if defined(__DECC) 157ebfedea0SLionel Sambuc # define OPENSSL_SYS_VMS_DECC 158ebfedea0SLionel Sambuc # elif defined(__DECCXX) 159ebfedea0SLionel Sambuc # define OPENSSL_SYS_VMS_DECC 160ebfedea0SLionel Sambuc # define OPENSSL_SYS_VMS_DECCXX 161ebfedea0SLionel Sambuc # else 162ebfedea0SLionel Sambuc # define OPENSSL_SYS_VMS_NODECC 163ebfedea0SLionel Sambuc # endif 164ebfedea0SLionel Sambuc # endif 165ebfedea0SLionel Sambuc 166*0a6a1f1dSLionel Sambuc /* -------------------------------- OS/2 ---------------------------------- */ 167ebfedea0SLionel Sambuc # if defined(__EMX__) || defined(__OS2__) 168ebfedea0SLionel Sambuc # undef OPENSSL_SYS_UNIX 169ebfedea0SLionel Sambuc # define OPENSSL_SYS_OS2 170ebfedea0SLionel Sambuc # endif 171ebfedea0SLionel Sambuc 172*0a6a1f1dSLionel Sambuc /* -------------------------------- Unix ---------------------------------- */ 173ebfedea0SLionel Sambuc # ifdef OPENSSL_SYS_UNIX 174ebfedea0SLionel Sambuc # if defined(linux) || defined(__linux__) || defined(OPENSSL_SYSNAME_LINUX) 175ebfedea0SLionel Sambuc # define OPENSSL_SYS_LINUX 176ebfedea0SLionel Sambuc # endif 177ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_MPE 178ebfedea0SLionel Sambuc # define OPENSSL_SYS_MPE 179ebfedea0SLionel Sambuc # endif 180ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_SNI 181ebfedea0SLionel Sambuc # define OPENSSL_SYS_SNI 182ebfedea0SLionel Sambuc # endif 183ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_ULTRASPARC 184ebfedea0SLionel Sambuc # define OPENSSL_SYS_ULTRASPARC 185ebfedea0SLionel Sambuc # endif 186ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_NEWS4 187ebfedea0SLionel Sambuc # define OPENSSL_SYS_NEWS4 188ebfedea0SLionel Sambuc # endif 189ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_MACOSX 190ebfedea0SLionel Sambuc # define OPENSSL_SYS_MACOSX 191ebfedea0SLionel Sambuc # endif 192ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_MACOSX_RHAPSODY 193ebfedea0SLionel Sambuc # define OPENSSL_SYS_MACOSX_RHAPSODY 194ebfedea0SLionel Sambuc # define OPENSSL_SYS_MACOSX 195ebfedea0SLionel Sambuc # endif 196ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_SUNOS 197ebfedea0SLionel Sambuc # define OPENSSL_SYS_SUNOS 198ebfedea0SLionel Sambuc # endif 199ebfedea0SLionel Sambuc # if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY) 200ebfedea0SLionel Sambuc # define OPENSSL_SYS_CRAY 201ebfedea0SLionel Sambuc # endif 202ebfedea0SLionel Sambuc # if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX) 203ebfedea0SLionel Sambuc # define OPENSSL_SYS_AIX 204ebfedea0SLionel Sambuc # endif 205ebfedea0SLionel Sambuc # endif 206ebfedea0SLionel Sambuc 207*0a6a1f1dSLionel Sambuc /* -------------------------------- VOS ----------------------------------- */ 208ebfedea0SLionel Sambuc # if defined(__VOS__) || defined(OPENSSL_SYSNAME_VOS) 209ebfedea0SLionel Sambuc # define OPENSSL_SYS_VOS 210ebfedea0SLionel Sambuc # ifdef __HPPA__ 211ebfedea0SLionel Sambuc # define OPENSSL_SYS_VOS_HPPA 212ebfedea0SLionel Sambuc # endif 213ebfedea0SLionel Sambuc # ifdef __IA32__ 214ebfedea0SLionel Sambuc # define OPENSSL_SYS_VOS_IA32 215ebfedea0SLionel Sambuc # endif 216ebfedea0SLionel Sambuc # endif 217ebfedea0SLionel Sambuc 218*0a6a1f1dSLionel Sambuc /* ------------------------------ VxWorks --------------------------------- */ 219ebfedea0SLionel Sambuc # ifdef OPENSSL_SYSNAME_VXWORKS 220ebfedea0SLionel Sambuc # define OPENSSL_SYS_VXWORKS 221ebfedea0SLionel Sambuc # endif 222ebfedea0SLionel Sambuc 223*0a6a1f1dSLionel Sambuc /* -------------------------------- BeOS ---------------------------------- */ 224ebfedea0SLionel Sambuc # if defined(__BEOS__) 225ebfedea0SLionel Sambuc # define OPENSSL_SYS_BEOS 226ebfedea0SLionel Sambuc # include <sys/socket.h> 227ebfedea0SLionel Sambuc # if defined(BONE_VERSION) 228ebfedea0SLionel Sambuc # define OPENSSL_SYS_BEOS_BONE 229ebfedea0SLionel Sambuc # else 230ebfedea0SLionel Sambuc # define OPENSSL_SYS_BEOS_R5 231ebfedea0SLionel Sambuc # endif 232ebfedea0SLionel Sambuc # endif 233ebfedea0SLionel Sambuc 234ebfedea0SLionel Sambuc /** 235ebfedea0SLionel Sambuc * That's it for OS-specific stuff 236ebfedea0SLionel Sambuc *****************************************************************************/ 237ebfedea0SLionel Sambuc 238ebfedea0SLionel Sambuc /* Specials for I/O an exit */ 239ebfedea0SLionel Sambuc # ifdef OPENSSL_SYS_MSDOS 240ebfedea0SLionel Sambuc # define OPENSSL_UNISTD_IO <io.h> 241ebfedea0SLionel Sambuc # define OPENSSL_DECLARE_EXIT extern void exit(int); 242ebfedea0SLionel Sambuc # else 243ebfedea0SLionel Sambuc # define OPENSSL_UNISTD_IO OPENSSL_UNISTD 244ebfedea0SLionel Sambuc # define OPENSSL_DECLARE_EXIT /* declared in unistd.h */ 245ebfedea0SLionel Sambuc # endif 246ebfedea0SLionel Sambuc 247*0a6a1f1dSLionel Sambuc /*- 248*0a6a1f1dSLionel Sambuc * Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, to define and declare 249*0a6a1f1dSLionel Sambuc * certain global symbols that, with some compilers under VMS, have to be 250*0a6a1f1dSLionel Sambuc * defined and declared explicitely with globaldef and globalref. 251*0a6a1f1dSLionel Sambuc * Definitions of OPENSSL_EXPORT and OPENSSL_IMPORT, to define and declare 252*0a6a1f1dSLionel Sambuc * DLL exports and imports for compilers under Win32. These are a little 253*0a6a1f1dSLionel Sambuc * more complicated to use. Basically, for any library that exports some 254*0a6a1f1dSLionel Sambuc * global variables, the following code must be present in the header file 255*0a6a1f1dSLionel Sambuc * that declares them, before OPENSSL_EXTERN is used: 256*0a6a1f1dSLionel Sambuc * 257*0a6a1f1dSLionel Sambuc * #ifdef SOME_BUILD_FLAG_MACRO 258*0a6a1f1dSLionel Sambuc * # undef OPENSSL_EXTERN 259*0a6a1f1dSLionel Sambuc * # define OPENSSL_EXTERN OPENSSL_EXPORT 260*0a6a1f1dSLionel Sambuc * #endif 261*0a6a1f1dSLionel Sambuc * 262*0a6a1f1dSLionel Sambuc * The default is to have OPENSSL_EXPORT, OPENSSL_IMPORT and OPENSSL_GLOBAL 263*0a6a1f1dSLionel Sambuc * have some generally sensible values, and for OPENSSL_EXTERN to have the 264*0a6a1f1dSLionel Sambuc * value OPENSSL_IMPORT. 265ebfedea0SLionel Sambuc */ 266ebfedea0SLionel Sambuc 267ebfedea0SLionel Sambuc # if defined(OPENSSL_SYS_VMS_NODECC) 268ebfedea0SLionel Sambuc # define OPENSSL_EXPORT globalref 269ebfedea0SLionel Sambuc # define OPENSSL_IMPORT globalref 270ebfedea0SLionel Sambuc # define OPENSSL_GLOBAL globaldef 271ebfedea0SLionel Sambuc # elif defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL) 272ebfedea0SLionel Sambuc # define OPENSSL_EXPORT extern __declspec(dllexport) 273ebfedea0SLionel Sambuc # define OPENSSL_IMPORT extern __declspec(dllimport) 274ebfedea0SLionel Sambuc # define OPENSSL_GLOBAL 275ebfedea0SLionel Sambuc # else 276ebfedea0SLionel Sambuc # define OPENSSL_EXPORT extern 277ebfedea0SLionel Sambuc # define OPENSSL_IMPORT extern 278ebfedea0SLionel Sambuc # define OPENSSL_GLOBAL 279ebfedea0SLionel Sambuc # endif 280ebfedea0SLionel Sambuc # define OPENSSL_EXTERN OPENSSL_IMPORT 281ebfedea0SLionel Sambuc 282*0a6a1f1dSLionel Sambuc /*- 283*0a6a1f1dSLionel Sambuc * Macros to allow global variables to be reached through function calls when 284*0a6a1f1dSLionel Sambuc * required (if a shared library version requires it, for example. 285*0a6a1f1dSLionel Sambuc * The way it's done allows definitions like this: 286*0a6a1f1dSLionel Sambuc * 287*0a6a1f1dSLionel Sambuc * // in foobar.c 288*0a6a1f1dSLionel Sambuc * OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0) 289*0a6a1f1dSLionel Sambuc * // in foobar.h 290*0a6a1f1dSLionel Sambuc * OPENSSL_DECLARE_GLOBAL(int,foobar); 291*0a6a1f1dSLionel Sambuc * #define foobar OPENSSL_GLOBAL_REF(foobar) 292ebfedea0SLionel Sambuc */ 293ebfedea0SLionel Sambuc # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION 294ebfedea0SLionel Sambuc # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \ 295ebfedea0SLionel Sambuc type *_shadow_##name(void) \ 296ebfedea0SLionel Sambuc { static type _hide_##name=value; return &_hide_##name; } 297ebfedea0SLionel Sambuc # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) 298ebfedea0SLionel Sambuc # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) 299ebfedea0SLionel Sambuc # else 300ebfedea0SLionel Sambuc # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_##name=value; 301ebfedea0SLionel Sambuc # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name 302ebfedea0SLionel Sambuc # define OPENSSL_GLOBAL_REF(name) _shadow_##name 303ebfedea0SLionel Sambuc # endif 304ebfedea0SLionel Sambuc 305ebfedea0SLionel Sambuc # if defined(OPENSSL_SYS_MACINTOSH_CLASSIC) && macintosh==1 && !defined(MAC_OS_GUSI_SOURCE) 306ebfedea0SLionel Sambuc # define ossl_ssize_t long 307ebfedea0SLionel Sambuc # endif 308ebfedea0SLionel Sambuc 309ebfedea0SLionel Sambuc # ifdef OPENSSL_SYS_MSDOS 310ebfedea0SLionel Sambuc # define ossl_ssize_t long 311ebfedea0SLionel Sambuc # endif 312ebfedea0SLionel Sambuc 313ebfedea0SLionel Sambuc # if defined(NeXT) || defined(OPENSSL_SYS_NEWS4) || defined(OPENSSL_SYS_SUNOS) 314ebfedea0SLionel Sambuc # define ssize_t int 315ebfedea0SLionel Sambuc # endif 316ebfedea0SLionel Sambuc 317ebfedea0SLionel Sambuc # if defined(__ultrix) && !defined(ssize_t) 318ebfedea0SLionel Sambuc # define ossl_ssize_t int 319ebfedea0SLionel Sambuc # endif 320ebfedea0SLionel Sambuc 321ebfedea0SLionel Sambuc # ifndef ossl_ssize_t 322ebfedea0SLionel Sambuc # define ossl_ssize_t ssize_t 323ebfedea0SLionel Sambuc # endif 324ebfedea0SLionel Sambuc 325ebfedea0SLionel Sambuc #ifdef __cplusplus 326ebfedea0SLionel Sambuc } 327ebfedea0SLionel Sambuc #endif 328ebfedea0SLionel Sambuc #endif 329