提交 e766a681 编写于 作者: B Bodo Möller

Some pre-POSIX systems don't have unistd.h (but e.g. lib.c).

Allow configuring the name of that header file.
上级 9e952fc8
此差异已折叠。
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern void exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern void exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
#include <stdlib.h> #include <stdlib.h>
#ifndef MSDOS #ifndef MSDOS
#ifndef VMS #ifndef VMS
#include <unistd.h> #include <openssl/opensslconf.h>
#include OPENSSL_UNISTD
#else /* VMS */ #else /* VMS */
#ifdef __DECC #ifdef __DECC
#include <unistd.h> #include <unistd.h>
......
...@@ -67,15 +67,16 @@ ...@@ -67,15 +67,16 @@
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <openssl/opensslconf.h>
#ifndef MSDOS #ifndef MSDOS
#if !defined(VMS) || defined(__DECC) #if !defined(VMS) || defined(__DECC)
#include <unistd.h> #include OPENSSL_UNISTD
#endif #endif
#endif #endif
#include <openssl/des.h> #include <openssl/des.h>
#include <openssl/opensslconf.h>
#ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */ #ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
......
...@@ -65,7 +65,8 @@ ...@@ -65,7 +65,8 @@
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS #ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#include OPENSSL_UNISTD
#else #else
#include <io.h> #include <io.h>
extern void exit(); extern void exit();
......
...@@ -66,7 +66,8 @@ ...@@ -66,7 +66,8 @@
#include <stdlib.h> #include <stdlib.h>
#ifndef MSDOS #ifndef MSDOS
#if !defined(VMS) || defined(__DECC) #if !defined(VMS) || defined(__DECC)
#include <unistd.h> #include <openssl/opensslconf.h>
#include OPENSSL_UNISTD
#endif /* VMS */ #endif /* VMS */
#else #else
#include <io.h> #include <io.h>
......
...@@ -57,7 +57,8 @@ ...@@ -57,7 +57,8 @@
*/ */
#if !defined(MSDOS) && !defined(VMS) && !defined(WIN32) #if !defined(MSDOS) && !defined(VMS) && !defined(WIN32)
#include <unistd.h> #include <openssl/opensslconf.h>
#include OPENSSL_UNISTD
/* If unistd.h defines _POSIX_VERSION, we conclude that we /* If unistd.h defines _POSIX_VERSION, we conclude that we
* are on a POSIX system and have sigaction and termios. */ * are on a POSIX system and have sigaction and termios. */
#if defined(_POSIX_VERSION) #if defined(_POSIX_VERSION)
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#endif #endif
#endif #endif
#define OPENSSL_UNISTD <unistd.h>
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
#define IDEA_INT unsigned int #define IDEA_INT unsigned int
#endif #endif
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -64,12 +64,11 @@ ...@@ -64,12 +64,11 @@
#endif #endif
#include <stdio.h> #include <stdio.h>
#ifndef MSDOS
#include <unistd.h> #include <openssl/e_os2.h>
#else #include OPENSSL_UNISTD_IO
#include <io.h> OPENSSL_DECLARE_EXIT
extern int exit();
#endif
#include <signal.h> #include <signal.h>
#ifndef _IRIX #ifndef _IRIX
#include <time.h> #include <time.h>
......
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
extern "C" { extern "C" {
#endif #endif
#include <openssl/opensslconf.h> /* OPENSSL_UNISTD */
#ifdef MSDOS
# define OPENSSL_UNISTD_IO <io.h>
# define OPENSSL_DECLARE_EXIT extern void exit(int);
#else
# define OPENSSL_UNISTD_IO OPENSSL_UNISTD
# define OPENSSL_DECLARE_EXIT /* declared in unistd.h */
#endif
/* Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN, /* Definitions of OPENSSL_GLOBAL and OPENSSL_EXTERN,
to define and declare certain global to define and declare certain global
symbols that, with some compilers under VMS, have to be defined and symbols that, with some compilers under VMS, have to be defined and
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册