# if defined(REF_DEBUG)
# define REF_ASSERT_ISNT(test) \
- (void)((test) ? (OpenSSLDie(__FILE__, __LINE__, "refcount error"), 1) : 0)
+ (void)((test) ? (OPENSSL_die("refcount error", __FILE__, __LINE__), 1) : 0)
# else
# define REF_ASSERT_ISNT(i)
# endif
# endif
# define osslargused(x) (void)x
+# define OPENSSL_CONF "openssl.cnf"
# ifndef DEVRANDOM
/*
# ifndef R_OK
# define R_OK 4
# endif
-# define OPENSSL_CONF "openssl.cnf"
-# define NUL_DEV "nul"
-# define RFILE ".rnd"
# ifdef OPENSSL_SYS_WINCE
# define DEFAULT_HOME ""
# else
# else
# include <unixlib.h>
# endif
-# define OPENSSL_CONF "openssl.cnf"
-# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ','
-# define NUL_DEV "NLA0:"
/* We don't have any well-defined random devices on VMS, yet... */
# undef DEVRANDOM
/*-
# define _kbhit kbhit
# define _O_TEXT O_TEXT
# define _O_BINARY O_BINARY
-# define OPENSSL_CONF "openssl.cnf"
-# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ';'
# define EXIT(n) { if (n) printf("ERROR: %d\n", (int)n); exit(n); }
# include <fcntl.h>
# endif
-# define OPENSSL_CONF "openssl.cnf"
-# define RFILE ".rnd"
# define LIST_SEPARATOR_CHAR ':'
-# define NUL_DEV "/dev/null"
# define EXIT(n) exit(n)
# endif
-# define OpenSSL_getpid() getpid()
-
# endif
/*************/
/* windows world */
# ifdef OPENSSL_NO_SOCK
-# define OpenSSL_Write(a,b,c) (-1)
-# define OpenSSL_Read(a,b,c) (-1)
# elif !defined(__DJGPP__)
# if defined(_WIN32_WCE) && _WIN32_WCE<410
# define getservbyname _masked_declaration_getservbyname
# define socket(d,t,p) ((int)socket(d,t,p))
# define accept(s,f,l) ((int)accept(s,f,l))
# endif
-# define OpenSSL_Write(a,b,c) send((a),(b),(c),0)
-# define OpenSSL_Read(a,b,c) recv((a),(b),(c),0)
# else
-# define OpenSSL_Write(a,b,c) write_s(a,b,c,0)
-# define OpenSSL_Read(a,b,c) read_s(a,b,c)
# endif
# elif defined(OPENSSL_SYS_NETWARE)
# else
# include <novsock2.h>
# endif
-# define OpenSSL_Write(a,b,c) send((a),(b),(c),0)
-# define OpenSSL_Read(a,b,c) recv((a),(b),(c),0)
# else
# endif
# endif
-# define OpenSSL_Read(a,b,c) read((a),(b),(c))
-# define OpenSSL_Write(a,b,c) write((a),(b),(c))
# ifndef INVALID_SOCKET
# define INVALID_SOCKET (-1)
# endif /* INVALID_SOCKET */
# endif
/* die if we have to */
-void OpenSSLDie(const char *file, int line, const char *assertion);
-# define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(OPENSSL_FILE, OPENSSL_LINE, #e),1))
+# if OPENSSL_API_COMPAT < 0x10100000L
+# define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l))
+# endif
+void OPENSSL_die(const char *assertion, const char *file, int line);
+# define OPENSSL_assert(e) \
+ (void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
unsigned int *OPENSSL_ia32cap_loc(void);
# define OPENSSL_ia32cap ((OPENSSL_ia32cap_loc())[0])