win32 compile tweaks .

carmen <[email protected]> Sat, 12 Jun 2004 23:00:51 -0700
Newsgroups gmane.network.irc.irssi.devel
Message-ID <[email protected]>
hi, if you want to build/run irssi using GCC on windows (mingw), add the following to common.h:

#ifdef WIN32
#define IRSSI_DIR_FULL "%s\\.irssi"
#include <winsock.h>
#include <glibc/signal.h>
#define EINPROGRESS WSAEINPROGRESS
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
#define mkstemp(m) _open(_mktemp(m), _O_RDWR)
#define sigemptyset(set)      ((*(set) = (__sigset_t) 0), 0)
#define _beep irssi_beep
#undef _FILE_OFFSET_BITS
#define glob _CRT_glob
#define globfree(m) Sleep(0)
#define stat _stat
#define open _open
#define close _close
#endif

the above should be CVS-safe altho maybe defined(WIN32) && !defined(CYGWIN) would be safer since it looks like theres already stuff there.. also had to add in fe-text/Makefile: -lgw32c -lregex -luuid -lole32 .

glib also complained about pathnames until switching / to \\ in a few places in core.c..perhaps it would be better to just define seperator in in the common.h to replace the hardcoded /'s... 

well works ..sortof..but for me im back to debian...

carmen

.