e_os.h (59191) | e_os.h (68651) |
---|---|
1/* e_os.h */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 73 unchanged lines hidden (view full) --- 82#define DEVRANDOM "/dev/urandom" 83#endif 84 85#if defined(__MWERKS__) && defined(macintosh) 86# if macintosh==1 87# ifndef MAC_OS_GUSI_SOURCE 88# define MAC_OS_pre_X 89# define NO_SYS_TYPES_H | 1/* e_os.h */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 73 unchanged lines hidden (view full) --- 82#define DEVRANDOM "/dev/urandom" 83#endif 84 85#if defined(__MWERKS__) && defined(macintosh) 86# if macintosh==1 87# ifndef MAC_OS_GUSI_SOURCE 88# define MAC_OS_pre_X 89# define NO_SYS_TYPES_H |
90 typedef long ssize_t; |
|
90# endif 91# define NO_SYS_PARAM_H 92# define NO_CHMOD 93# define NO_SYSLOG 94# undef DEVRANDOM 95# define GETPID_IS_MEANINGLESS 96# endif 97#endif --- 4 unchanged lines hidden (view full) --- 102/* The following is used becaue of the small stack in some 103 * Microsoft operating systems */ 104#if defined(WIN16) || defined(MSDOS) 105# define MS_STATIC static 106#else 107# define MS_STATIC 108#endif 109 | 91# endif 92# define NO_SYS_PARAM_H 93# define NO_CHMOD 94# define NO_SYSLOG 95# undef DEVRANDOM 96# define GETPID_IS_MEANINGLESS 97# endif 98#endif --- 4 unchanged lines hidden (view full) --- 103/* The following is used becaue of the small stack in some 104 * Microsoft operating systems */ 105#if defined(WIN16) || defined(MSDOS) 106# define MS_STATIC static 107#else 108# define MS_STATIC 109#endif 110 |
110#if defined(_WIN32) && !defined(WIN32) | 111#if defined(_WIN32) && !defined(WIN32) && !defined(__CYGWIN32__) |
111# define WIN32 112#endif 113 | 112# define WIN32 113#endif 114 |
114#if defined(WIN32) || defined(WIN16) | 115#if (defined(WIN32) || defined(WIN16)) && !defined(__CYGWIN32__) |
115# ifndef WINDOWS 116# define WINDOWS 117# endif 118# ifndef MSDOS 119# define MSDOS 120# endif 121#endif 122 --- 7 unchanged lines hidden (view full) --- 130#if !defined(WINNT) 131#define WIN_CONSOLE_BUG 132#endif 133#else 134#define get_last_sys_error() errno 135#define clear_sys_error() errno=0 136#endif 137 | 116# ifndef WINDOWS 117# define WINDOWS 118# endif 119# ifndef MSDOS 120# define MSDOS 121# endif 122#endif 123 --- 7 unchanged lines hidden (view full) --- 131#if !defined(WINNT) 132#define WIN_CONSOLE_BUG 133#endif 134#else 135#define get_last_sys_error() errno 136#define clear_sys_error() errno=0 137#endif 138 |
138#ifdef WINDOWS | 139#if defined(WINDOWS) && !defined(__CYGWIN32__) |
139#define get_last_socket_error() WSAGetLastError() 140#define clear_socket_error() WSASetLastError(0) 141#define readsocket(s,b,n) recv((s),(b),(n),0) 142#define writesocket(s,b,n) send((s),(b),(n),0) 143#define EADDRINUSE WSAEADDRINUSE 144#elif defined(MAC_OS_pre_X) 145#define get_last_socket_error() errno 146#define clear_socket_error() errno=0 --- 17 unchanged lines hidden (view full) --- 164# define MS_CALLBACK 165# define MS_FAR 166#endif 167 168#ifdef NO_STDIO 169# define NO_FP_API 170#endif 171 | 140#define get_last_socket_error() WSAGetLastError() 141#define clear_socket_error() WSASetLastError(0) 142#define readsocket(s,b,n) recv((s),(b),(n),0) 143#define writesocket(s,b,n) send((s),(b),(n),0) 144#define EADDRINUSE WSAEADDRINUSE 145#elif defined(MAC_OS_pre_X) 146#define get_last_socket_error() errno 147#define clear_socket_error() errno=0 --- 17 unchanged lines hidden (view full) --- 165# define MS_CALLBACK 166# define MS_FAR 167#endif 168 169#ifdef NO_STDIO 170# define NO_FP_API 171#endif 172 |
172#if defined(WINDOWS) || defined(MSDOS) | 173#if (defined(WINDOWS) || defined(MSDOS)) && !defined(__CYGWIN32__) |
173 174# ifndef S_IFDIR 175# define S_IFDIR _S_IFDIR 176# endif 177 178# ifndef S_IFMT 179# define S_IFMT _S_IFMT 180# endif --- 88 unchanged lines hidden (view full) --- 269 exit(__VMS_EXIT); \ 270 return(__VMS_EXIT); } while(0) 271# else 272# define EXIT(n) return(n) 273# endif 274# define NO_SYS_PARAM_H 275# else 276 /* !defined VMS */ | 174 175# ifndef S_IFDIR 176# define S_IFDIR _S_IFDIR 177# endif 178 179# ifndef S_IFMT 180# define S_IFMT _S_IFMT 181# endif --- 88 unchanged lines hidden (view full) --- 270 exit(__VMS_EXIT); \ 271 return(__VMS_EXIT); } while(0) 272# else 273# define EXIT(n) return(n) 274# endif 275# define NO_SYS_PARAM_H 276# else 277 /* !defined VMS */ |
278# ifdef MPE 279# define NO_SYS_PARAM_H 280# endif |
|
277# ifdef OPENSSL_UNISTD 278# include OPENSSL_UNISTD 279# else 280# include <unistd.h> 281# endif 282# ifndef NO_SYS_TYPES_H 283# include <sys/types.h> 284# endif | 281# ifdef OPENSSL_UNISTD 282# include OPENSSL_UNISTD 283# else 284# include <unistd.h> 285# endif 286# ifndef NO_SYS_TYPES_H 287# include <sys/types.h> 288# endif |
285# ifdef NeXT | 289# if defined(NeXT) || defined(NEWS4) |
286# define pid_t int /* pid_t is missing on NEXTSTEP/OPENSTEP 287 * (unless when compiling with -D_POSIX_SOURCE, 288 * which doesn't work for us) */ 289# define ssize_t int /* ditto */ 290# endif | 290# define pid_t int /* pid_t is missing on NEXTSTEP/OPENSTEP 291 * (unless when compiling with -D_POSIX_SOURCE, 292 * which doesn't work for us) */ 293# define ssize_t int /* ditto */ 294# endif |
295# ifdef NEWS4 /* setvbuf is missing on mips-sony-bsd */ 296# define setvbuf(a, b, c, d) setbuffer((a), (b), (d)) 297 typedef unsigned long clock_t; 298# endif |
|
291 292# define OPENSSL_CONF "openssl.cnf" 293# define SSLEAY_CONF OPENSSL_CONF 294# define RFILE ".rnd" 295# define LIST_SEPARATOR_CHAR ':' 296# define NUL_DEV "/dev/null" 297# ifndef MONOLITH 298# define EXIT(n) exit(n); return(n) --- 35 unchanged lines hidden (view full) --- 334# define SHUTDOWN(fd) MacSocket_close(fd) 335# define SHUTDOWN2(fd) MacSocket_close(fd) 336 337# else 338 339# ifndef NO_SYS_PARAM_H 340# include <sys/param.h> 341# endif | 299 300# define OPENSSL_CONF "openssl.cnf" 301# define SSLEAY_CONF OPENSSL_CONF 302# define RFILE ".rnd" 303# define LIST_SEPARATOR_CHAR ':' 304# define NUL_DEV "/dev/null" 305# ifndef MONOLITH 306# define EXIT(n) exit(n); return(n) --- 35 unchanged lines hidden (view full) --- 342# define SHUTDOWN(fd) MacSocket_close(fd) 343# define SHUTDOWN2(fd) MacSocket_close(fd) 344 345# else 346 347# ifndef NO_SYS_PARAM_H 348# include <sys/param.h> 349# endif |
342# include <sys/time.h> /* Needed under linux for FD_XXX */ | 350# ifndef MPE 351# include <sys/time.h> /* Needed under linux for FD_XXX */ 352# endif |
343 344# include <netdb.h> 345# if defined(VMS) && !defined(__DECC) 346# include <socket.h> 347# include <in.h> 348# else 349# include <sys/socket.h> 350# ifdef FILIO_H --- 6 unchanged lines hidden (view full) --- 357# include <sys/fcntl.h> 358# include <sys/types.h> 359# endif 360 361# ifdef AIX 362# include <sys/select.h> 363# endif 364 | 353 354# include <netdb.h> 355# if defined(VMS) && !defined(__DECC) 356# include <socket.h> 357# include <in.h> 358# else 359# include <sys/socket.h> 360# ifdef FILIO_H --- 6 unchanged lines hidden (view full) --- 367# include <sys/fcntl.h> 368# include <sys/types.h> 369# endif 370 371# ifdef AIX 372# include <sys/select.h> 373# endif 374 |
375# ifdef __QNX__ 376# include <sys/select.h> 377# endif 378 |
|
365# if defined(sun) 366# include <sys/filio.h> 367# else 368# ifndef VMS 369# include <sys/ioctl.h> 370# else 371 /* ioctl is only in VMS > 7.0 and when socketshr is not used */ 372# if !defined(TCPIP_TYPE_SOCKETSHR) && defined(__VMS_VER) && (__VMS_VER > 70000000) --- 24 unchanged lines hidden (view full) --- 397#endif 398 399#if defined(THREADS) || defined(sun) 400#ifndef _REENTRANT 401#define _REENTRANT 402#endif 403#endif 404 | 379# if defined(sun) 380# include <sys/filio.h> 381# else 382# ifndef VMS 383# include <sys/ioctl.h> 384# else 385 /* ioctl is only in VMS > 7.0 and when socketshr is not used */ 386# if !defined(TCPIP_TYPE_SOCKETSHR) && defined(__VMS_VER) && (__VMS_VER > 70000000) --- 24 unchanged lines hidden (view full) --- 411#endif 412 413#if defined(THREADS) || defined(sun) 414#ifndef _REENTRANT 415#define _REENTRANT 416#endif 417#endif 418 |
419#if defined(sun) && !defined(__svr4__) && !defined(__SVR4) 420 /* bcopy can handle overlapping moves according to SunOS 4.1.4 manpage */ 421# define memmove(s1,s2,n) bcopy((s2),(s1),(n)) 422# define strtoul(s,e,b) ((unsigned long int)strtol((s),(e),(b))) 423extern char *sys_errlist[]; extern int sys_nerr; 424# define strerror(errnum) \ 425 (((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum]) 426#endif 427 |
|
405/***********************************************/ 406 407/* do we need to do this for getenv. 408 * Just define getenv for use under windows */ 409 410#ifdef WIN16 411/* How to do this needs to be thought out a bit more.... */ 412/*char *GETENV(char *); --- 34 unchanged lines hidden --- | 428/***********************************************/ 429 430/* do we need to do this for getenv. 431 * Just define getenv for use under windows */ 432 433#ifdef WIN16 434/* How to do this needs to be thought out a bit more.... */ 435/*char *GETENV(char *); --- 34 unchanged lines hidden --- |