From 4146a07de5f44f3ea00a3ef0026098b28e7451de Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 17 Dec 2005 02:25:32 +0100 Subject: Fix win32 build using mingw32 on linux (no ssl and yahoo yet though) --- Makefile | 4 ++-- bitlbee.h | 7 ++----- doc/BUILD.win32 | 3 +++ sock.h | 5 ----- storage_text.c | 8 ++++++++ 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 #include #include +#include + #ifndef _WIN32 #include -#include #endif #include @@ -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 -# ifndef _MSC_VER -# include -# endif # if !defined(BITLBEE_CORE) && defined(_MSC_VER) # pragma comment(lib,"bitlbee.lib") # endif # include # 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 -- cgit v1.2.3