# include <io.h>
# include <fcntl.h>
+# ifdef __MINGW32__
+# define ssize_t long
+# endif
+
# if defined (__BORLANDC__)
# define _setmode setmode
# define _O_TEXT O_TEXT
# ifndef NO_SYS_TYPES_H
# include <sys/types.h>
# endif
+# ifdef NeXT
+# define pid_t int /* pid_t is missing on NEXTSTEP/OPENSTEP
+ * (unless when compiling with -D_POSIX_SOURCE,
+ * which doesn't work for us) */
+# define ssize_t int /* ditto */
+# endif
# define OPENSSL_CONF "openssl.cnf"
# define SSLEAY_CONF OPENSSL_CONF