X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=0701a78d5cdab0a38e51f1fe25c46db4643528e8;hp=4f2c7750a3355cfed0b55c8603b47874c4929209;hb=f9eca34c22a0fdb88dbc37983b1a04612548aafe;hpb=f625d383719b3edb0c498d9596ead025935d0453 diff --git a/e_os.h b/e_os.h index 4f2c7750a3..0701a78d5c 100644 --- a/e_os.h +++ b/e_os.h @@ -1,4 +1,3 @@ -/* e_os.h */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -72,15 +71,26 @@ extern "C" { #endif /* Used to checking reference counts, most while doing perl5 stuff :-) */ -# ifdef REF_PRINT -# undef REF_PRINT -# define REF_PRINT(a,b) fprintf(stderr,"%08X:%4d:%s\n",(int)b,b->references,a) +# if defined(OPENSSL_NO_STDIO) +# if defined(REF_DEBUG) +# error "REF_DEBUG requires stdio" +# endif +# if defined(REF_PRINT) +# error "REF_PRINT requires stdio" +# endif # endif -# if defined(OPENSSL_NO_STDIO) && defined(REF_CHECK) -# error "Cannot have REF_CHECK with no-stdio" + +# if defined(REF_DEBUG) +# define REF_ASSERT_ISNT(test) \ + (void)((test) ? (OpenSSLDie(__FILE__, __LINE__, "refcount error"), 1) : 0) +# else +# define REF_ASSERT_ISNT(i) # endif -# if defined(OPENSSL_NO_STDIO) && defined(REF_PRINT) -# error "Cannot have REF_PRINT with no-stdio" +# ifdef REF_PRINT +# define REF_PRINT_COUNT(a, b) \ + fprintf(stderr, "%p:%4d:%s\n", b, b->references, a) +# else +# define REF_PRINT_COUNT(a, b) # endif # ifndef DEVRANDOM @@ -90,7 +100,7 @@ extern "C" { */ # define DEVRANDOM "/dev/urandom","/dev/random","/dev/srandom" # endif -# ifndef DEVRANDOM_EGD +# if !defined(OPENSSL_NO_EGD) && !defined(DEVRANDOM_EGD) /* * set this to a comma-separated list of 'egd' sockets to try out. These * sockets will be tried in the order listed in case accessing the device @@ -498,6 +508,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); * configured for BSD */ # if defined(NETWARE_BSDSOCK) +# include # include # include # include @@ -546,6 +557,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); # endif # include # include +# include # endif # ifdef OPENSSL_SYS_AIX