Harald A. Irmer wrote:
2.`memmove' in run-time-system is Sys5ish, replace by memcpy (in memory.h), at least please set conditions, #ifdef Sys5 memmove ... memmove is in GNU C++
The run time system already uses memcpy, not memmove (memmove was still mentioned in a comment and a #define, but it wasn't used anymore, so I removed it). memmove is used in rts.c which is actually part of the compiler, not the RTS, for the Move function. But using memcpy here would be wrong, because according to the memcpy manpage, the source and destination areas may not overlap, but they may overlap for Move. So, I implemented _p_move in rts/move.pas. Peter, can you use that in rts.c instead of memmove?
3.RAND_MAX (p/rts/random.c) is not known to SunOS, neither to gcc, set for my purpose #define RAND_MAX 32767
Hmmm... according to my rand() manpage, it's part of ISO, but anyway...
I inserted:
#ifndef RAND_MAX #define RAND_MAX 32767 #endif
But is that safe? I'm applying a modulo (RAND_MAX + 1) to the numbers returned by rand(), so it wouldn't hurt much if RAND_MAX is chosen too small. (Theoretically I could set it to 1, to be safe, but that would be quite inefficient, because then rand() would be called for every bit needed.)
Or to say it differently: how do you know that 32767 is correct for SunOS? Does SunOS document it? (As a general fact or only for SunOS?) Or is it written in some header in some way?
Peter Gerwinski wrote:
5.p/gpi-hash.c needs <sys/stdtypes.h> (size_t)
I do not have <sys/stdtypes.h> here (under Linux). Is there any portable way to include it? (AutoConf experts around here?)
Perhaps <sys/stdtypes.h> is included in some other, more common, system header in SunOS, so we can include that one?
Frank
-- Frank Heckenbach, frank@fjf.gnu.de http://fjf.gnu.de/ PGP and GPG keys: http://fjf.gnu.de/plan