[Vm-dev] ucontext.h or sys/ucontext.h

stes stes at telenet.be
Thu Apr 30 07:12:11 UTC 2020


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


The issue on aio.c is totally unrelated, it's just something I wrote,
because it is also related to platform-dependent #include files,
and the big impact they can have.

Regarding the <ucontext.h> issue, it is not a big deal.

I think the files 

sqUnixMain.c:#include "include_ucontext.h"

and

sqUnixVMProfile.c:#include "include_ucontext.h"

they both #include a local header file include_ucontext.h

which is doing something like:

#ifdef __OpenBSD__
# include <sys/signal.h>
#else
# include <sys/ucontext.h>
#endif

The code that is including <sys/ucontext.h> is working on Solaris,
but not entirely correct.

It depends on how the Solaris system is setup, I see that the Solaris
docs say that you have to #include <ucontext.h>

Whether <sys/ucontext.h> or <ucontext.h> it seems a little bit like
a Byzantine discussion on the sex of angels, and it seems
something that for the last 23 years (since 1997) or so caused some
discussion, as some SUS or POSIX standard committee said that the header was
#include <ucontext.h> and the de-facto standard is not following them.

Basically in the Solaris case #include <ucontext.h> is including
<sys/ucontext.h>

However I submit a minor change for the <ucontext.h> in the __sun case.

This has no impact on any other platform,
and in fact I don't think anything should be changed for other platforms.

However hopefully my pull request for the __sun change is accepted !

David

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJeqnosAAoJEAwpOKXMq1MacEQH/RF7AzzssWuUeSfqFWyOTSB0
No5GowOydEjAuGnOjHGczgAAlZwUkqtmT0AjFDwsOprLSXPrPlhbBMh7D/FMgKD8
Zk+7XO0ltK1PLj9tUCc8X56Rd8l3eTZaZ5cvDX43LIbyLQIdDPui2xrdsnfIJWij
iP2tUGgbdSXpFRLKy5UjJriC/KbfmqtGtknoJ84MHM85NobdFPbWH/S8Rcdc3JsT
u1H1ceEmTOaYhjhyOTMmKi+JwpfJ51SnjNufrZWX+55YZIGAeRAwXLE9Muq0ESe2
M/iQRHet7m957b9IQsLvAMswSoivenC8C0hw1t7Kw8GR20dbv4RWqPtVn5NZz6Y=
=FNOr
-----END PGP SIGNATURE-----




--
Sent from: http://forum.world.st/Squeak-VM-f104410.html


More information about the Vm-dev mailing list