X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=e_os.h;h=3a4ba6dd1845ab4dca0c27b5fb313226604c61f2;hp=9b9bb4f765144be04fd0a08aa9609c5cb5fcf254;hb=5dc312215fa54b70cc8b4baec933bcc19525bc03;hpb=349807608f31b20af01a342d0072bb92e0b036e2 diff --git a/e_os.h b/e_os.h index 9b9bb4f765..3a4ba6dd18 100644 --- a/e_os.h +++ b/e_os.h @@ -71,17 +71,30 @@ 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 +# define osslargused(x) (void)x + # ifndef DEVRANDOM /* * set this to a comma-separated list of 'random' device files to try out. My @@ -497,6 +510,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); * configured for BSD */ # if defined(NETWARE_BSDSOCK) +# include # include # include # include @@ -545,6 +559,7 @@ struct servent *PASCAL getservbyname(const char *, const char *); # endif # include # include +# include # endif # ifdef OPENSSL_SYS_AIX