X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=6aa0f73ed068f5b08b3f23c597cfed0b1327124a;hp=f4a427af0aa8d0b649872cf7f42fb8c403ce3177;hb=61ae935a9831d2b132e50508ccc37f879c17a5c4;hpb=c168a027cfe1459e946dade4179938f34894fe1d diff --git a/e_os.h b/e_os.h index f4a427af0a..6aa0f73ed0 100644 --- a/e_os.h +++ b/e_os.h @@ -76,6 +76,12 @@ extern "C" { # undef REF_PRINT # define REF_PRINT(a,b) fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->references,a) # endif +# if defined(OPENSSL_NO_STDIO) && defined(REF_CHECK) +# error "Cannot have REF_CHECK with no-stdio" +# endif +# if defined(OPENSSL_NO_STDIO) && defined(REF_PRINT) +# error "Cannot have REF_PRINT with no-stdio" +# endif # ifndef DEVRANDOM /* @@ -112,7 +118,7 @@ extern "C" { # define MSDOS # endif -# if defined(MSDOS) && !defined(GETPID_IS_MEANINGLESS) +# if (defined(MSDOS) || defined(OPENSSL_SYS_UEFI)) && !defined(GETPID_IS_MEANINGLESS) # define GETPID_IS_MEANINGLESS # endif @@ -471,7 +477,9 @@ struct servent *PASCAL getservbyname(const char *, const char *); /* * Even though sizeof(SOCKET) is 8, it's safe to cast it to int, because * the value constitutes an index in per-process table of limited size - * and not a real pointer. + * and not a real pointer. And we also depend on fact that all processors + * Windows run on happen to be two's-complement, which allows to + * interchange INVALID_SOCKET and -1. */ # define socket(d,t,p) ((int)socket(d,t,p)) # define accept(s,f,l) ((int)accept(s,f,l)) @@ -605,7 +613,7 @@ extern int sys_nerr; # define strerror(errnum) \ (((errnum)<0 || (errnum)>=sys_nerr) ? NULL : sys_errlist[errnum]) /* Being signed SunOS 4.x memcpy breaks ASN1_OBJECT table lookup */ -# include "crypto/o_str.h" +# include "internal/o_str.h" # define memcmp OPENSSL_memcmp # endif @@ -624,7 +632,7 @@ extern int sys_nerr; # define strncasecmp _strnicmp # elif defined(OPENSSL_SYS_VMS) /* VMS below version 7.0 doesn't have strcasecmp() */ -# include "o_str.h" +# include "internal/o_str.h" # define strcasecmp OPENSSL_strcasecmp # define strncasecmp OPENSSL_strncasecmp # define OPENSSL_IMPLEMENTS_strncasecmp @@ -689,6 +697,8 @@ struct servent *getservbyname(const char *name, const char *proto); # endif # endif +#define OSSL_NELEM(x) (sizeof(x)/sizeof(x[0])) + #ifdef __cplusplus } #endif