| OLD | NEW |
| 1 /* e_os2.h */ | 1 /* e_os2.h */ |
| 2 /* ==================================================================== | 2 /* ==================================================================== |
| 3 * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. | 3 * Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 #endif | 186 #endif |
| 187 # if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY) | 187 # if defined(_CRAY) || defined(OPENSSL_SYSNAME_CRAY) |
| 188 # define OPENSSL_SYS_CRAY | 188 # define OPENSSL_SYS_CRAY |
| 189 # endif | 189 # endif |
| 190 # if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX) | 190 # if defined(_AIX) || defined(OPENSSL_SYSNAME_AIX) |
| 191 # define OPENSSL_SYS_AIX | 191 # define OPENSSL_SYS_AIX |
| 192 # endif | 192 # endif |
| 193 #endif | 193 #endif |
| 194 | 194 |
| 195 /* --------------------------------- VOS ----------------------------------- */ | 195 /* --------------------------------- VOS ----------------------------------- */ |
| 196 #ifdef OPENSSL_SYSNAME_VOS | 196 #if defined(__VOS__) || defined(OPENSSL_SYSNAME_VOS) |
| 197 # define OPENSSL_SYS_VOS | 197 # define OPENSSL_SYS_VOS |
| 198 #ifdef __HPPA__ |
| 199 # define OPENSSL_SYS_VOS_HPPA |
| 200 #endif |
| 201 #ifdef __IA32__ |
| 202 # define OPENSSL_SYS_VOS_IA32 |
| 203 #endif |
| 198 #endif | 204 #endif |
| 199 | 205 |
| 200 /* ------------------------------- VxWorks --------------------------------- */ | 206 /* ------------------------------- VxWorks --------------------------------- */ |
| 201 #ifdef OPENSSL_SYSNAME_VXWORKS | 207 #ifdef OPENSSL_SYSNAME_VXWORKS |
| 202 # define OPENSSL_SYS_VXWORKS | 208 # define OPENSSL_SYS_VXWORKS |
| 203 #endif | 209 #endif |
| 204 | 210 |
| 211 /* --------------------------------- BeOS ---------------------------------- */ |
| 212 #if defined(__BEOS__) |
| 213 # define OPENSSL_SYS_BEOS |
| 214 # include <sys/socket.h> |
| 215 # if defined(BONE_VERSION) |
| 216 # define OPENSSL_SYS_BEOS_BONE |
| 217 # else |
| 218 # define OPENSSL_SYS_BEOS_R5 |
| 219 # endif |
| 220 #endif |
| 221 |
| 205 /** | 222 /** |
| 206 * That's it for OS-specific stuff | 223 * That's it for OS-specific stuff |
| 207 *****************************************************************************/ | 224 *****************************************************************************/ |
| 208 | 225 |
| 209 | 226 |
| 210 /* Specials for I/O an exit */ | 227 /* Specials for I/O an exit */ |
| 211 #ifdef OPENSSL_SYS_MSDOS | 228 #ifdef OPENSSL_SYS_MSDOS |
| 212 # define OPENSSL_UNISTD_IO <io.h> | 229 # define OPENSSL_UNISTD_IO <io.h> |
| 213 # define OPENSSL_DECLARE_EXIT extern void exit(int); | 230 # define OPENSSL_DECLARE_EXIT extern void exit(int); |
| 214 #else | 231 #else |
| (...skipping 29 matching lines...) Expand all Loading... |
| 244 # define OPENSSL_IMPORT extern __declspec(dllimport) | 261 # define OPENSSL_IMPORT extern __declspec(dllimport) |
| 245 # define OPENSSL_GLOBAL | 262 # define OPENSSL_GLOBAL |
| 246 #else | 263 #else |
| 247 # define OPENSSL_EXPORT extern | 264 # define OPENSSL_EXPORT extern |
| 248 # define OPENSSL_IMPORT extern | 265 # define OPENSSL_IMPORT extern |
| 249 # define OPENSSL_GLOBAL | 266 # define OPENSSL_GLOBAL |
| 250 #endif | 267 #endif |
| 251 #define OPENSSL_EXTERN OPENSSL_IMPORT | 268 #define OPENSSL_EXTERN OPENSSL_IMPORT |
| 252 | 269 |
| 253 /* Macros to allow global variables to be reached through function calls when | 270 /* Macros to allow global variables to be reached through function calls when |
| 254 required (if a shared library version requvres it, for example. | 271 required (if a shared library version requires it, for example. |
| 255 The way it's done allows definitions like this: | 272 The way it's done allows definitions like this: |
| 256 | 273 |
| 257 // in foobar.c | 274 // in foobar.c |
| 258 » OPENSSL_IMPLEMENT_GLOBAL(int,foobar) = 0; | 275 » OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0) |
| 259 // in foobar.h | 276 // in foobar.h |
| 260 OPENSSL_DECLARE_GLOBAL(int,foobar); | 277 OPENSSL_DECLARE_GLOBAL(int,foobar); |
| 261 #define foobar OPENSSL_GLOBAL_REF(foobar) | 278 #define foobar OPENSSL_GLOBAL_REF(foobar) |
| 262 */ | 279 */ |
| 263 #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION | 280 #ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION |
| 264 # define OPENSSL_IMPLEMENT_GLOBAL(type,name)» » » \ | 281 # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value)» » » \ |
| 265 » extern type _hide_##name;» » » » \ | 282 » type *_shadow_##name(void)» » » » » \ |
| 266 » type *_shadow_##name(void) { return &_hide_##name; }» \ | 283 » { static type _hide_##name=value; return &_hide_##name; } |
| 267 » static type _hide_##name | |
| 268 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) | 284 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void) |
| 269 # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) | 285 # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name())) |
| 270 #else | 286 #else |
| 271 # define OPENSSL_IMPLEMENT_GLOBAL(type,name) OPENSSL_GLOBAL type _shadow_##name | 287 # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) OPENSSL_GLOBAL type _shadow_#
#name=value; |
| 272 # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name | 288 # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name |
| 273 # define OPENSSL_GLOBAL_REF(name) _shadow_##name | 289 # define OPENSSL_GLOBAL_REF(name) _shadow_##name |
| 274 #endif | 290 #endif |
| 275 | 291 |
| 276 #ifdef __cplusplus | 292 #ifdef __cplusplus |
| 277 } | 293 } |
| 278 #endif | 294 #endif |
| 279 #endif | 295 #endif |
| OLD | NEW |