[Vm-dev] latest sources removal platforms/unix/vm/sunos.h
stes@PANDORA.BE
stes at telenet.be
Sun Nov 8 11:19:10 UTC 2020
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
After experimenting with lseek and lseek64, the following also could help:
bash-4.4$ cat fileoffsetbits.c
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
int main(int argc,char *argv[])
{
printf("_FILE_OFFSET_BITS is %i\n",_FILE_OFFSET_BITS);
}
bash-4.4$ cc -m64 fileoffsetbits.c
bash-4.4$ ./a.out
_FILE_OFFSET_BITS is 64
bash-4.4$ cc -m32 fileoffsetbits.c
bash-4.4$ ./a.out
_FILE_OFFSET_BITS is 32
bash-4.4$ cc -m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 fileoffsetbits.c
bash-4.4$ ./a.out
_FILE_OFFSET_BITS is 64
The lfcompile manpage on Solaris says that one possibility is to compile with the above -D flags to support large files on 32bit executables.
This seems an issue that is also related to the configure.ac test
for AC_SYS_LARGEFILE
But that sets the _FILE_OFFSET_BITS in the "config.h".
So then it is an issue of having to #include config.h before the <sys/types.h>
Anyway, the SunOS 32bit VM used to work, but currently has this (minor) issue.
It is minor because it seems solvable by setting the -D options in the mvm script.
If I use the following patch it works:
- --- a/build.sunos32x86/squeak.stack.spur/build/mvm
+++ b/build.sunos32x86/squeak.stack.spur/build/mvm
@@ -10,7 +10,7 @@ esac
# Stack Spur VM with VM profiler and threaded heartbeat
INSTALLDIR=sqstkspursunosht/usr
# Some gcc versions create a broken VM using -O2
- -OPT="-g -DAIO_DEBUG -DNDEBUG -DDEBUGVM=0"
+OPT="-g -DAIO_DEBUG -DNDEBUG -DDEBUGVM=0 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
That is probably the easiest way to get the old behavior back.
Regards,
David Stes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJfp9PkAAoJEAwpOKXMq1MaZCcIAKzwPC+8nrluYmdLC/g+vJNf
oIF76MmaCIkaY3pfMNnjY+KyCJZk/wkM4tKXLrsEGGwUuwFXqK4ffBcmvsHCt8Zu
N+32QijgjkICqMuDX9B4kL3pQe1Jyx2e8A7NqTEL8cd0Omrw6eOmr8xnJ7f1JhC9
RSH+bGwzipwFZD9Lfn0ZlTkiYOhqZ+291OEhhvVqJuHHNUk0pcnaNcrc0iVDoTTp
BDE9mZKABzThr6MlCLyx4UmWn0cOUAikg9wf3kZYkF4qjZ4/zjQqJ/a+oZnyjqmn
3gEzqa4k2GZFa3H4xQtaZmXN9La6LgRMUv0G9y9dgu8nqBxdzb/15tjC9idi71E=
=MorK
-----END PGP SIGNATURE-----
More information about the Vm-dev
mailing list