# 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
/*
# 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
/*
* 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))
# 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
# 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
# endif
# endif
+#define OSSL_NELEM(x) (sizeof(x)/sizeof(x[0]))
+
#ifdef __cplusplus
}
#endif