]>
git.pond.sub.org Git - empserver/log
Ron Koenderink [Tue, 28 Aug 2007 21:06:22 +0000 (21:06 +0000)]
(posix_accept, posix_bind, posix_listen, posix_setsockopt,
posix_shutdown, posix_socket, socklen_t) [_WIN32]: Move socket
related externs to sys/socket.h.
(inet_ntop) [_WIN32]: Move extern to inet.h.
(tcp_listen): Remove the !WIN32 includes and use the revised
sys/socket.h, netinet/in.h, arpa/inet.h and netdb.h.
Ron Koenderink [Mon, 27 Aug 2007 00:21:39 +0000 (00:21 +0000)]
(posix_mkdir) [_WIN32]: Change CR/LF to LF.
Ron Koenderink [Sun, 26 Aug 2007 23:11:17 +0000 (23:11 +0000)]
(posix_mkdir) [_WIN32]: Add function comment.
Ron Koenderink [Sun, 26 Aug 2007 23:04:14 +0000 (23:04 +0000)]
(posix_close, posix_read, posix_write) [_WIN32]:
Move CANT_REACH() and return -1 into a default case.
Removes warnings for MinGW of potential missing cases.
(posix_accept, posix_socket) [_WIN32]: Switch handle to SOCKET
to match Windows call. Cast to an int for translation map.
Ron Koenderink [Sun, 26 Aug 2007 22:54:59 +0000 (22:54 +0000)]
[_WIN32]: Add io.h for isatty(). Required for MinGW.
Ron Koenderink [Sun, 26 Aug 2007 22:53:40 +0000 (22:53 +0000)]
(abday,day,admon,mon,am_pm) [_WIN32]: Add const to declarations.
Removes warning in MinGW.
Ron Koenderink [Fri, 24 Aug 2007 21:46:32 +0000 (21:46 +0000)]
(inet_ntop) [_WIN32]: Improve the error checking for getnameinfo().
Ron Koenderink [Fri, 24 Aug 2007 21:05:59 +0000 (21:05 +0000)]
(posix_fileno) [_WIN32]: Rename posix_fileno() to fileno().
Remove the extern posix_fileno().
(fileno) [_WIN32]: Replace system fileno() with a function that supports posix
file descriptors. Move #undef fileno to w32misc.h as the system define
is in stdio.h.
(rea) [_WIN32]: Add stdio.h for fileno() extern declaration and add misc.h
to ensure the WIN32 fixes to stdio.h are included.
Ron Koenderink [Fri, 24 Aug 2007 20:51:00 +0000 (20:51 +0000)]
(ssize) [_WIN32]: Switch __W64 to _w64, incorrectly case.
ssize_t declaration conflicts with MinGW
long declaration for ssize_t so add a #ifdef _MSC_VER
around the ssize_t declaration.
Ron Koenderink [Fri, 24 Aug 2007 20:19:53 +0000 (20:19 +0000)]
(snprintf) [_WIN32]: snprintf() should have <stdio.h>.
Markus Armbruster [Fri, 24 Aug 2007 17:28:47 +0000 (17:28 +0000)]
Update for 4.3.10.
Markus Armbruster [Fri, 24 Aug 2007 17:24:07 +0000 (17:24 +0000)]
Doc fix.
Markus Armbruster [Fri, 24 Aug 2007 17:23:26 +0000 (17:23 +0000)]
(verify_fail): Print index as it looks in input.
Markus Armbruster [Fri, 24 Aug 2007 17:22:12 +0000 (17:22 +0000)]
(gen_power) [!_WIN32]: Previous revision inserted fsync(), where
previously something equivalent was done only for _WIN32. Revert
that.
Markus Armbruster [Fri, 24 Aug 2007 17:07:48 +0000 (17:07 +0000)]
(ssize_t): Match system's size_t more closely.
Markus Armbruster [Fri, 24 Aug 2007 17:05:18 +0000 (17:05 +0000)]
(output): Remove unused parameter eol. Caller changed.
Markus Armbruster [Fri, 24 Aug 2007 17:03:44 +0000 (17:03 +0000)]
Fix grammar for human-readable header.
Clarify state of symbolic indexes.
Markus Armbruster [Fri, 24 Aug 2007 16:59:17 +0000 (16:59 +0000)]
(readv): Cope with malloc(0) returning null pointer.
(writev): call write() even when total size is zero.
Markus Armbruster [Thu, 23 Aug 2007 18:26:04 +0000 (18:26 +0000)]
(buil_bc): Reduce bridge span cost to $1000.
(buil_tower_bc): Reduce bridge tower cost to $3000.
Ron Koenderink [Thu, 23 Aug 2007 03:02:19 +0000 (03:02 +0000)]
(inet_ntop) [_WIN32]: Add HAVE_GETADDRINFO around inet_ntop.
MinGW does not support getnameinfo() for Windows 2000 or earlier.
Ron Koenderink [Wed, 22 Aug 2007 02:17:07 +0000 (02:17 +0000)]
(mode_t) [_WIN32]: Switch to unsigned short to match the declaration
in the MinGW for mode_t.
Ron Koenderink [Tue, 21 Aug 2007 13:46:21 +0000 (13:46 +0000)]
(inet_ntop) [_WIN32]: New. Windows equivalent for inet_ntop().
[_WIN32]: New in.h, inet.h, netdb.h. Windows equivalent for POSIX
includes.
(tcp_connect): Use new include files and inet_ntop().
Allows tcp_connect() to compile when HAVE_GETADDRINFO is enabled.
Ron Koenderink [Mon, 20 Aug 2007 20:20:16 +0000 (20:20 +0000)]
Standardize include file order.
Ron Koenderink [Mon, 20 Aug 2007 20:18:33 +0000 (20:18 +0000)]
Replace winsock2.h and undef NS_ALL with sys/socket.h to prevent
multiple occurences undef NS_ALL from nesting include files.
Ron Koenderink [Mon, 20 Aug 2007 20:13:56 +0000 (20:13 +0000)]
Replace the incorrectly commented out file prototypes.h with
misc.h.
Ron Koenderink [Mon, 20 Aug 2007 20:01:47 +0000 (20:01 +0000)]
(tcp_connect) [_WIN32]: Add ws2tcpip.h to allow tcp_connect() to
compile when HAVE_GETADDRINFO is enabled.
Ron Koenderink [Mon, 20 Aug 2007 19:59:12 +0000 (19:59 +0000)]
(tcp_connect, hostconnect) [_WIN32]: Replace close() with
closesocket() as Windows close() does not support closing
socket connections.
Ron Koenderink [Sun, 19 Aug 2007 21:44:11 +0000 (21:44 +0000)]
[_WIN32]: Remove empio.h, not required anymore.
Ron Koenderink [Sun, 19 Aug 2007 15:21:42 +0000 (15:21 +0000)]
[_WIN32]: Remove unnecessary Windows include files.
Markus Armbruster [Sun, 19 Aug 2007 14:19:52 +0000 (14:19 +0000)]
(flock): Fix member types to conform to POSIX.
Markus Armbruster [Sun, 19 Aug 2007 09:11:38 +0000 (09:11 +0000)]
(mode_t, off_t): New.
(posix_mkdir, posix_bind, posix_setsockopt, posix_lseek, posix_read)
(posix_write): Fix prototypes to conform to POSIX.
Markus Armbruster [Sun, 19 Aug 2007 06:41:59 +0000 (06:41 +0000)]
Don't include direct.h, as our fake unistd.h now does the job.
Ron Koenderink [Sun, 19 Aug 2007 01:51:34 +0000 (01:51 +0000)]
(getopt) [_WIN32]: Only getopt.c for MSC. MinGW has getopt()
in the library.
Ron Koenderink [Sun, 19 Aug 2007 01:47:43 +0000 (01:47 +0000)]
(strptime) [_WIN32]: Postpone the declaration of the struct tm for strptime().
Pick up the declaration for struct tm when time.h is included in the source file.
Ron Koenderink [Sun, 19 Aug 2007 01:40:14 +0000 (01:40 +0000)]
(getcwd) [_WIN32]: getcwd() is included in unistd.h in POSIX so
add <direct.h> into the windows equivalent for unistd.h.
Ron Koenderink [Sun, 19 Aug 2007 01:37:25 +0000 (01:37 +0000)]
(getopt) [_WIN32]: In order to prevent namespace conflict between MSC and
MinGW created an extern getopt() in unistd.h. MinGW has getopt() in the library.
MSC does not have getopt() function.
Ron Koenderink [Sun, 19 Aug 2007 01:20:00 +0000 (01:20 +0000)]
(fileno) [_WIN32]: Remove unnecessary #ifdef fileno/#endif.
Ron Koenderink [Sun, 19 Aug 2007 00:55:14 +0000 (00:55 +0000)]
(va_start) [_WIN32]: For va_start() requires stdarg.h and stdio.h.
Ron Koenderink [Sun, 19 Aug 2007 00:54:29 +0000 (00:54 +0000)]
(va_start) [_WIN32]: For va_start() requires stdarg.h.
Ron Koenderink [Sun, 19 Aug 2007 00:41:44 +0000 (00:41 +0000)]
(mkdir) [_WIN32]: Remove direct.h from posixio.c, not need.
Markus Armbruster [Sat, 18 Aug 2007 17:03:14 +0000 (17:03 +0000)]
Trim system includes.
Markus Armbruster [Sat, 18 Aug 2007 16:54:37 +0000 (16:54 +0000)]
Include config.h.
Markus Armbruster [Sat, 18 Aug 2007 16:28:56 +0000 (16:28 +0000)]
Portability fix: include all headers traditionally required for
select().
Markus Armbruster [Sat, 18 Aug 2007 13:48:15 +0000 (13:48 +0000)]
(fltelemstr, fltheadstr): Move from ship.h to sail.c.
Markus Armbruster [Sat, 18 Aug 2007 09:24:05 +0000 (09:24 +0000)]
(exec_fd): Useless junk inherited all the way from BSD Empire 1.1.
Remove.
Markus Armbruster [Sat, 18 Aug 2007 07:00:16 +0000 (07:00 +0000)]
(setsockopt): Fix type of argument optval to conform to spec.
Ron Koenderink [Fri, 17 Aug 2007 20:45:55 +0000 (20:45 +0000)]
Add additional includes for compiling in MinGW.
Ron Koenderink [Fri, 17 Aug 2007 20:43:32 +0000 (20:43 +0000)]
Switch the !__GNUC__ with _MSC_VER to be more reflective of the
purpose.
(strptime) [_WIN32]: Add time.h for extern prototypes.
Ron Koenderink [Fri, 17 Aug 2007 03:11:45 +0000 (03:11 +0000)]
(tcp_listen, posix_setsockopt) [_WIN32]: Move the special
SO_REUSEADDR code for _WIN32 from tcp_listen() to
posix_setsockopt().
[_WIN32] (posix_open): Switch to _sopen() for _sopen_s() as MinGW
does not support _sopen_s() yet.
[_WIN32] (posix_fd2socket): Fix typo.
Ron Koenderink [Fri, 17 Aug 2007 03:06:35 +0000 (03:06 +0000)]
Include sys/uio.h unconditionally.
Ron Koenderink [Thu, 16 Aug 2007 21:43:20 +0000 (21:43 +0000)]
[_WIN32] (readv, writev, iovec): New. POSIX equivalents.
(ioq_makeiov, ioqtoiov): Compile unconditionally.
(io_output): Use POSIX code unconditionally.
[_WIN32] (ioq_makebuf): Remove.
Markus Armbruster [Thu, 16 Aug 2007 10:41:30 +0000 (10:41 +0000)]
Back out the previous revision and remove the include of sys/types.h
instead.
Ron Koenderink [Thu, 16 Aug 2007 03:15:33 +0000 (03:15 +0000)]
For w32misc.h add the POSIX equivalent include file for each
declaration.
Ron Koenderink [Thu, 16 Aug 2007 03:03:22 +0000 (03:03 +0000)]
(ssize_t, pid_t) [_WIN32]: Back out the previous revision of unistd.h
and move to w32misc.h instead. Belong into sys/types.h but we can't
fix system headers.
Ron Koenderink [Wed, 15 Aug 2007 02:46:08 +0000 (02:46 +0000)]
Include sys/uio.h unconditionally.
Ron Koenderink [Wed, 15 Aug 2007 02:40:53 +0000 (02:40 +0000)]
[_WIN32] Provide POSIX-style sys/socket.h. Use it rather than
winsock2.h.
Ron Koenderink [Wed, 15 Aug 2007 02:18:25 +0000 (02:18 +0000)]
[_WIN32]: Remove unnecessary <io.h> for WIN32.
Ron Koenderink [Wed, 15 Aug 2007 02:15:17 +0000 (02:15 +0000)]
Move WIN32 equivalent function defines to w32/w32misc.h from misc.h.
Move Microsoft C compiler warning to w32/w32misc.h from misc.h.
Ron Koenderink [Wed, 15 Aug 2007 01:48:40 +0000 (01:48 +0000)]
(ssize_t, pid_t) [_WIN32]: Move from misc.h to POSIX's location
in unistd.h.
Ron Koenderink [Wed, 15 Aug 2007 01:18:48 +0000 (01:18 +0000)]
(serverio, sendoef) [_WIN32]: For WIN32 use closesocket() instead of
close() as close() is not valid for WIN32 sockets.
Ron Koenderink [Wed, 15 Aug 2007 01:16:26 +0000 (01:16 +0000)]
Create w32misc.h to contain information that does not fit in Windows
equivalent include file.
(strptime) [_WIN32]: Add extern for WIN32 equivalent for strptime().
Ron Koenderink [Tue, 14 Aug 2007 03:38:18 +0000 (03:38 +0000)]
[_WIN32] (S_IRUSR, S_IWUSR, S_IXUSR, S_IRWXU, S_IRGRP, S_IWGRP)
(S_IXGRP, S_IRWXG, S_IROTH, S_IWOTH, S_IXOTH, S_IRWXO): Move from
include/misc.h to new src/lib/w32/unistd.h.
Ron Koenderink [Tue, 14 Aug 2007 03:33:28 +0000 (03:33 +0000)]
Simple POSIX I/O emulation layer to work around Windows's defective
Unix I/O:
[_WIN32] (socklen_t, accept, posix_accept, bind. posix_bind, listen)
(posix_listen, setsockopt, posix_setsockopt, shutdown, posix_shutdown)
(socket, posix_socket, close, posix_close, creat, fstat, posix_fstat)
(lseek, posix_lseek, open, posix_open, read, posix_read, write)
(posix_write, fileno, posix_fileno, fcntl, O_NONBLOCK, F_RDLCK)
(F_WRLCK, F_GETFL, F_SETFL, F_SETLK, EWOULDBLOCK, ENOTSOCK)
(flock, fsync, posix_fsync):
New.
(ef_open, io_close, io_input, io_output, io_shutdown, io_noblocking)
(player_accept): Use them to simplify.
[_WIN32] (posix_fd2socket): New.
(empth_select): Use it.
(gen_power): Use it.
Ron Koenderink [Tue, 14 Aug 2007 03:11:26 +0000 (03:11 +0000)]
[_WIN32] (posix_mkdir): New.
[_WIN32] (mkdir): Use it. Last argument is no longer ignored, which
was a bug. Move declaration to unistd.h, which isn't quite right, but
works for us.
Ron Koenderink [Tue, 14 Aug 2007 00:15:21 +0000 (00:15 +0000)]
Real unistd.h declares getopt() & friends. Approximate that in
src/lib/w32/unistd.h by including getopt.h. Simplify users
Ron Koenderink [Sat, 11 Aug 2007 19:54:42 +0000 (19:54 +0000)]
Remove bogus _WIN32 conditional.
Ron Koenderink [Sat, 11 Aug 2007 19:07:46 +0000 (19:07 +0000)]
Now compiled only for Windows, remove unnecessary #if.
Ron Koenderink [Thu, 9 Aug 2007 03:44:52 +0000 (03:44 +0000)]
(strptime) [_WIN32]: Provide missing functionality from WIN32.
Source taken from FreeBSD.
Markus Armbruster [Wed, 8 Aug 2007 06:15:33 +0000 (06:15 +0000)]
(info.html/all.html): Fix to use the full 80 columns for the table.
(info.nr/all): Fix race between ls and output redirection.
Markus Armbruster [Wed, 8 Aug 2007 05:27:49 +0000 (05:27 +0000)]
Moving getopt.h to src/lib/w32/ broke the Windows build. Fix.
Markus Armbruster [Sun, 5 Aug 2007 18:58:36 +0000 (18:58 +0000)]
(xufooter, xubody): Rename some variables. No functional change.
Markus Armbruster [Sun, 5 Aug 2007 18:52:16 +0000 (18:52 +0000)]
(xundump): Use malloc() instead of calloc() for fldca and fldidx,
because the used part of these arrays is explicitely initialized by
deffld().
Markus Armbruster [Sun, 5 Aug 2007 18:47:51 +0000 (18:47 +0000)]
(xufld): Clarify.
Markus Armbruster [Sun, 5 Aug 2007 18:46:04 +0000 (18:46 +0000)]
(xufldname): Don't bother to catch ... in field 1, because the check
for the required join field catches that.
Markus Armbruster [Sun, 5 Aug 2007 18:42:24 +0000 (18:42 +0000)]
(defellipsis): Set ellipsis to 1 instead of field number, because all
uses just compare to 0. Parameter now unused, remove. Caller
changed.
Markus Armbruster [Sun, 5 Aug 2007 18:38:37 +0000 (18:38 +0000)]
Fix fields checks for split tables:
(caseen): Remove.
(xufldhdr, deffld): Record only fields in this part in caflds[]. This
fixes the check for duplicate fields in parts other than the first.
(cafldspp): New, to record fields in previous parts.
(xundump): Initialize and finalize it.
(xufooter): Update it. Requires new parameter ca. Caller changed.
(fldval_must_match): Use it to do the right thing for split arrays.
(chkflds): Adapt for changed caflds[].
(chkflds): The check for missing fields was skipped for all parts of a
split table instead of for all but the final part.
Markus Armbruster [Sun, 5 Aug 2007 18:23:09 +0000 (18:23 +0000)]
(xufldhdr): ellipsis wasn't cleared for machine-readable input. This
broke reading machine-readable input after reading a split table
failed before seeing the last part. Luckily, callers never tried
that.
Markus Armbruster [Sun, 5 Aug 2007 17:36:01 +0000 (17:36 +0000)]
(xutail): Remove parameter type. Use cur_type instead. Caller
changed.
Markus Armbruster [Sun, 5 Aug 2007 17:34:24 +0000 (17:34 +0000)]
(getobj, setnum): Move override of cur_id from getobj() to setnum().
Remove the now unused parameters of getobj(). Callers changed.
Markus Armbruster [Sun, 5 Aug 2007 17:25:01 +0000 (17:25 +0000)]
(xuheader1, xufldhdr, xutrailer, xufooter, xundump2, xutail)
(xundump1, xubody): Rename.
Markus Armbruster [Sun, 5 Aug 2007 17:19:52 +0000 (17:19 +0000)]
(xundump1, xundump2): Move call of xutrailer() from xundump1() to its
caller xundump2(). Make xundump1() return number of records read for
that.
Markus Armbruster [Sun, 5 Aug 2007 17:05:22 +0000 (17:05 +0000)]
(xundump1): Remove parameter type. Use cur_type instead. Caller
changed.
Markus Armbruster [Sun, 5 Aug 2007 17:03:07 +0000 (17:03 +0000)]
(xuheader1, xutrailer, xundump1): Remove unused parameters. Callers
changed.
Markus Armbruster [Sun, 5 Aug 2007 16:22:41 +0000 (16:22 +0000)]
(xundump): Count lines in a saner way: pass line number in and out.
Callers changed.
Markus Armbruster [Sat, 4 Aug 2007 05:23:39 +0000 (05:23 +0000)]
New home for stuff specific to Windows: src/lib/w32/
Move getopt.c getopt.h service.c from src/lib/gen/ there.
(lib/libw32.a): New.
(libs): Add it under Windows.
Markus Armbruster [Fri, 3 Aug 2007 04:44:54 +0000 (04:44 +0000)]
(gamedir): Not all programs treat relative names the same. Document
the lossage.
Markus Armbruster [Fri, 3 Aug 2007 04:06:18 +0000 (04:06 +0000)]
Doc fix.
Markus Armbruster [Fri, 3 Aug 2007 04:05:04 +0000 (04:05 +0000)]
(bmaps_intersect): Simplify. No functional change.
Ron Koenderink [Fri, 3 Aug 2007 01:47:02 +0000 (01:47 +0000)]
(fmttime2822) [_WIN32]: Replace localtime_s() with localtime().
Replace _snprintf_s() with _snprintf(). These secure functions are
not supported by MinGW yet.
Markus Armbruster [Wed, 1 Aug 2007 18:23:51 +0000 (18:23 +0000)]
(main): Use the same initial anchor as the server.
(main): Exit unsuccessfully when read_schedule() fails.
Markus Armbruster [Wed, 1 Aug 2007 05:30:37 +0000 (05:30 +0000)]
Fix include missing since misc.h rev. 1.69.
Markus Armbruster [Tue, 31 Jul 2007 05:03:25 +0000 (05:03 +0000)]
(ef_open): Leaked file descriptor when fcntl() failed.
Markus Armbruster [Tue, 31 Jul 2007 05:01:46 +0000 (05:01 +0000)]
(new): Simplify. No functional change.
Markus Armbruster [Tue, 31 Jul 2007 04:57:07 +0000 (04:57 +0000)]
Doc fix.
Ron Koenderink [Sun, 29 Jul 2007 16:57:36 +0000 (16:57 +0000)]
(upda): Remove unused local variable fp.
Markus Armbruster [Sun, 29 Jul 2007 13:40:47 +0000 (13:40 +0000)]
(fl_sct_init, write_sects, file_sct_init, main): Do not initialize
sector and realm timestamps to current time. It's not useful, and it
facilitates attacks against the PRNG. This backs out fairland.c
rev. 1.27 and files.c rev. 1.31 and partly backs out files.c
rev. 1.38.
Markus Armbruster [Sat, 28 Jul 2007 19:33:35 +0000 (19:33 +0000)]
(subst.in): Polish substitution of @configure_input@.
Markus Armbruster [Sat, 28 Jul 2007 19:31:30 +0000 (19:31 +0000)]
(disablefil): Remove, belatedly (unused since optlist.h rev. 1.46).
Markus Armbruster [Sat, 28 Jul 2007 19:18:41 +0000 (19:18 +0000)]
(datarootdir): New; Autoconf 2.60 wants it.
Markus Armbruster [Sat, 28 Jul 2007 13:58:58 +0000 (13:58 +0000)]
Remove the ancient, crufty non-UCONTEXT system-dependent LWP code.
Using it required manual hackery since 4.3.0, and it hasn't been
missed.