[Rd] latest beta + MinGW 3.1.0-1 = minor fix needed
simon.urbanek at math.uni-augsburg.de
Fri Oct 3 19:08:15 MEST 2003
MinGW 3.1.0-1 is currently the latest official MinGW release, therefore
I tried to compile the latest R beta (rsync today). There is one minor
problem when trying that:
gcc -O2 -Wall -pedantic -I../../include -I../../gnuwin32
-DHAVE_CONFIG_H -c internet.c -o internet.o
In file included from internet.c:880:
sock.h:23: conflicting types for `ssize_t'
n:/MinGW/include/sys/types.h:119: previous declaration of `ssize_t'
make: *** [internet.o] Error 1
(This is in src/modules/internet)
Obviously ssize_t was added to the system types in MinGW. The
typedef long _ssize_t;
typedef int ssize_t;
There are two possible fixes for this:
1) make sock.h use long instead of int.
2) use something like:
#if defined Win32 && !defined _SSIZE_T_
I don't think either fix is "better" in any way, but personally I'd go
for the "long" (for Win32 I don't see any difference, but for Win64 fix
2) may be less safe?).
More information about the R-devel