Fix windows build

svn:r2670
This commit is contained in:
Nick Mathewson 2004-11-04 04:01:19 +00:00
parent d0c158c8d6
commit b74b72a5ce
4 changed files with 9 additions and 5 deletions

View File

@ -8,6 +8,7 @@
#define _GNU_SOURCE
#include "orconfig.h"
#include "compat.h"
#ifdef MS_WINDOWS
#include <io.h>
@ -65,7 +66,6 @@
#include <string.h>
#include <assert.h>
#include "compat.h"
#include "log.h"
#include "util.h"

View File

@ -13,7 +13,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#ifdef MS_WINDOWS
#include "..\..\contrib\zlib\zlib.h"
#else
#include <zlib.h>
#endif
#include "util.h"
#include "log.h"

View File

@ -14,6 +14,9 @@
#define _GNU_SOURCE
#include "orconfig.h"
#include "util.h"
#include "log.h"
#include "crypto.h"
/* XXXX probably some of these are unneeded. find out which. */
#ifdef MS_WINDOWS
@ -31,9 +34,6 @@
#include <string.h>
#include <assert.h>
#include "util.h"
#include "log.h"
#include "crypto.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>

View File

@ -63,7 +63,7 @@ typedef struct config_var_t {
} config_var_t;
/** Return the offset of <b>member</b> within the type <b>tp</b>, in bytes */
#define STRUCT_OFFSET(tp, member) ((off_t) &(((tp*)0)->member))
#define STRUCT_OFFSET(tp, member) ((off_t) (((char*)&((tp*)0)->member)-(char*)0))
/** An entry for config_vars: "The option <b>name</b> has type
* CONFIG_TYPE_<b>conftype</b>, and corresponds to
* or_options_t.<b>member</b>"