Skip to content

Commit

Permalink
Include opensslconf.h or the like early to make sure system macros get
Browse files Browse the repository at this point in the history
correctly defined.
  • Loading branch information
levitte committed Feb 20, 2001
1 parent 6525ced commit 56dde3e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions apps/s_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_STDIO
#define APPS_WIN16
#endif
Expand Down
1 change: 1 addition & 0 deletions apps/s_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <openssl/opensslconf.h>
#ifdef OPENSSL_NO_STDIO
#define APPS_WIN16
#endif
Expand Down
16 changes: 8 additions & 8 deletions apps/s_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@
#include <errno.h>
#include <signal.h>

#define USE_SOCKETS
#define NON_MAIN
#include "apps.h"
#undef USE_SOCKETS
#undef NON_MAIN
#include "s_apps.h"
#include <openssl/ssl.h>

/* With IPv6, it looks like Digital has mixed up the proper order of
recursive header file inclusion, resulting in the compiler complaining
that u_int isn't defined, but only if _POSIX_C_SOURCE is defined, which
Expand All @@ -71,14 +79,6 @@
typedef unsigned int u_int;
#endif

#define USE_SOCKETS
#define NON_MAIN
#include "apps.h"
#undef USE_SOCKETS
#undef NON_MAIN
#include "s_apps.h"
#include <openssl/ssl.h>

static struct hostent *GetHostByName(char *name);
#ifdef OPENSSL_SYS_WINDOWS
static void sock_cleanup(void);
Expand Down

0 comments on commit 56dde3e

Please sign in to comment.