projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Check method before access and release ctx in error paths
[openssl.git]
/
e_os.h
diff --git
a/e_os.h
b/e_os.h
index 9b9bb4f765144be04fd0a08aa9609c5cb5fcf254..3a4ba6dd1845ab4dca0c27b5fb313226604c61f2 100644
(file)
--- 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 :-) */
#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
# 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
# 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
# endif
+# define osslargused(x) (void)x
+
# ifndef DEVRANDOM
/*
* set this to a comma-separated list of 'random' device files to try out. My
# 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)
* configured for BSD
*/
# if defined(NETWARE_BSDSOCK)
+# include <netdb.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <sys/time.h>
# include <sys/socket.h>
# include <netinet/in.h>
# include <sys/time.h>
@@
-545,6
+559,7
@@
struct servent *PASCAL getservbyname(const char *, const char *);
# endif
# include <netinet/in.h>
# include <arpa/inet.h>
# endif
# include <netinet/in.h>
# include <arpa/inet.h>
+# include <netinet/tcp.h>
# endif
# ifdef OPENSSL_SYS_AIX
# endif
# ifdef OPENSSL_SYS_AIX