aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-12-17 02:25:32 +0100
committerJelmer Vernooij <jelmer@samba.org>2005-12-17 02:25:32 +0100
commit4146a07de5f44f3ea00a3ef0026098b28e7451de (patch)
treebd449c4153b9c8aed8217693eb3790eefd1914d0
parentbd69a219c0a618354fd80a98dd0d9a04fee755e0 (diff)
Fix win32 build using mingw32 on linux (no ssl and yahoo yet though)
-rw-r--r--Makefile4
-rw-r--r--bitlbee.h7
-rw-r--r--doc/BUILD.win323
-rw-r--r--sock.h5
-rw-r--r--storage_text.c8
5 files changed, 15 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index ae86fcf1..762457bf 100644
--- a/Makefile
+++ b/Makefile
@@ -9,13 +9,13 @@
-include Makefile.settings
# Program variables
-objects = account.o bitlbee.o commands.o crypting.o help.o ini.o irc.o log.o nick.o query.o set.o url.o user.o storage_text.o storage.o
+objects = account.o bitlbee.o commands.o crypting.o help.o ini.o irc.o nick.o query.o set.o url.o user.o storage_text.o storage.o
subdirs = protocols
ifeq ($(ARCH),Windows)
objects += win32.o
else
-objects += unix.o conf.o
+objects += unix.o conf.o log.o
endif
# Expansion of variables
diff --git a/bitlbee.h b/bitlbee.h
index 41247270..fdde4b6f 100644
--- a/bitlbee.h
+++ b/bitlbee.h
@@ -47,9 +47,10 @@
#include <stdarg.h>
#include <stdio.h>
#include <ctype.h>
+#include <errno.h>
+
#ifndef _WIN32
#include <syslog.h>
-#include <errno.h>
#endif
#include <glib.h>
@@ -75,10 +76,6 @@
#undef strncasecmp
#define strncasecmp __PLEASE_USE_G_STRNCASECMP_INSTEAD__
-#ifndef F_OK
-#define F_OK 0
-#endif
-
#define _( x ) x
#define ROOT_NICK "root"
diff --git a/doc/BUILD.win32 b/doc/BUILD.win32
index e21e1aaf..e00cfdda 100644
--- a/doc/BUILD.win32
+++ b/doc/BUILD.win32
@@ -16,6 +16,9 @@ Instructions for building BitlBee on Windows
- nss (in security/nss/)
- nspr (in nspr/)
+ glib and gettext are only required for actually running BitlBee - building
+ should work fine without them.
+
3. Set the following variables in Makefile.settings, if you don't have the
libraries above installed in the default directories searched by MSVC:
diff --git a/sock.h b/sock.h
index 3e74bf96..3878cff1 100644
--- a/sock.h
+++ b/sock.h
@@ -9,17 +9,12 @@
#define closesocket(a) close(a)
#else
# include <winsock2.h>
-# ifndef _MSC_VER
-# include <ws2tcpip.h>
-# endif
# if !defined(BITLBEE_CORE) && defined(_MSC_VER)
# pragma comment(lib,"bitlbee.lib")
# endif
# include <io.h>
# define read(a,b,c) recv(a,b,c,0)
# define write(a,b,c) send(a,b,c,0)
-# define umask _umask
-# define mode_t int
# define sock_make_nonblocking(fd) { int non_block = 1; ioctlsocket(fd, FIONBIO, &non_block); }
# define sockerr_again() (WSAGetLastError() == WSAEINTR || WSAGetLastError() == WSAEINPROGRESS || WSAGetLastError() == WSAEWOULDBLOCK)
# define ETIMEDOUT WSAETIMEDOUT
diff --git a/storage_text.c b/storage_text.c
index ed32b73f..d3823cac 100644
--- a/storage_text.c
+++ b/storage_text.c
@@ -26,6 +26,14 @@
#define BITLBEE_CORE
#include "bitlbee.h"
#include "crypting.h"
+#ifdef _WIN32
+# define umask _umask
+# define mode_t int
+#endif
+
+#ifndef F_OK
+#define F_OK 0
+#endif
/* DO NOT USE THIS FUNCTION IN NEW CODE. This
* function is here merely because the save/load code still uses