latest sources i saw was in rpm format and ive never seen a windows rpm reader
thanks for hints, ill take a look
global.h had it defined in one spot, with an #else and then it not defined within the else (?)
I cut and pasted it over, and it then borked compiling saying _atoi64 was undefined. (atoll was defined as _atoi64 earlier)
i noticed its used as a factor in exp related calculations--im checking what happens if i define it as 1
whoops, it IS a function... mai bad
redid global.h a bit, made an insert at line 72
/* use atoi under cygwin systems--how you figure out if it's cygwin, ionno */
#define atoll(x) _atoi(x)
apparantly _atoi is defined, but _atoi64 is not
It compiles past that landmine, then pukes with TTY under daemon.c
make wrote:daemon.c: In function `BecomeDaemon':
daemon.c:123: error: `TIOCNOTTY' undeclared (first use in this function)
daemon.c:123: error: (Each undeclared identifier is reported only once
daemon.c:123: error: for each function it appears in.)
make[1]: *** [daemon.o] Error 1
make[1]: Leaving directory `/home/Administrator/crossfire/server'
make: *** [all-recursive] Error 1
Now, at line 123 in daemon.c:
daemon.c wrote: (void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */
Alright, so I have no idea what the TIOC or the TTY stands for, but i have an idea that I'm lacking one of them, especially due to the surrounding code:
daemon.c wrote: if ((i = open ("/dev/tty", O_RDWR)) >= 0) { /* did open succeed? */
#if (defined(SYSV) || defined(hpux)) && defined(TIOCTTY)
int zero = 0;
(void) ioctl (i, TIOCTTY, &zero);
#else
# ifdef HAVE_SYS_TERMIOS_H
# include <sys/termios.h>
# else
# ifdef HAVE_SYS_TTYCOM_H
# include <sys/ttycom.h>
# endif
# endif
(void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */
#endif
(void) close (i);
}
Here's the funny part: Under cygwin, i lack either a /dev/ or a /sys/.
bash wrote:$ cd /
Administrator@stwong /
$ ls
bin cygwin.bat cygwin.ico etc home lib sbin tmp usr var
Administrator@stwong /
$
Hmm... since it can't read anything in /dev/ anyway if it doesnt exist, what happens if i comment that entire chunk?
commented lines 110-126 in daemon.c and it appears to be compiling longer without puking...
make finished somewhat without obviously puking. LOTS of warnings, but it has been said those should be ignored using MSVC, so ill ignore them using GCC as well
now, to try make install to see if it works
...
_atoi64 to _atoi was not a good idea apparantly:
crossfire.exe wrote:Reading attack messages from /usr/games/crossfire/share/crossfire/attackmess...g
ot 260 messages in 19 categories.
Reading clockdata from /usr/games/crossfire/var/crossfire/clockdata...todtick=0
Experience for level 112 is lower than previous level (2147483647 <= 2147483647)
It only chops off about 5 levels as a temp fix, but a later fix would be needed should this actually be sourced (and as a side effect, hell freezing over--would need some code to check for cygwin)
/usr/games/crossfire/etc/crossfire/etc_table
line 35
max_level 110
instead of
max_level 115
line 112-113
#3141600000, 6283200000, 12566400000,
#25132800000, 50265600000
instead of
3141600000, 6283200000, 12566400000,
25132800000, 50265600000
However, once the exp table is fixed to allow for the _atoi fix, running crossfire.exe gives this:
<hit on firewall>
crossfire.exe wrote:Waiting for connections...
doeric_server: error on select: Bad file descriptor
doeric_server: error on select
Waiting for connections...
doeric_server: error on select: Bad file descriptor
doeric_server: error on select
Waiting for connections...
doeric_server: error on select: Bad file descriptor
doeric_server: error on select
Waiting for connections...
doeric_server: error on select: Bad file descriptor
doeric_server: error on select
SIGINT received.
Emergency saves disabled, no save attempted
Cleaning up...
The waiting for connections / doeric_server things are an infinite loop apparantly, I used CTRL-C and it popped out to bash after SIGINT recieved.
Any ideas?
(As for the warnings during compile--All the ones ive been able to read were no newline at end of code warnings.
As for switching _atoi64 to _atoi, _atoi64 does not appear to be recognized by cygwin's gcc port... nor does it recognize _atoll or atoll, one of which appears to be the linux version... So looks like im in a tough spot with that.)