www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - setjmp support for windows.

reply zz <zz zz.com> writes:
Hi,

Is setjmp/longjmp supported under windows?

Regards,
zz
Feb 24
parent reply Paul Backus <snarwin gmail.com> writes:
On Monday, 24 February 2025 at 12:53:30 UTC, zz wrote:
 Hi,

 Is setjmp/longjmp supported under windows?

 Regards,
 zz
It's a standard C function, and Microsoft's online library documentation says that it's supported, so it should work. In D, bindings for standard C headers are available in the `core.stdc` package, so you can access `<setjmp.h>` with `import core.stdc.setjmp;`.
Mar 04
parent reply zz <zz zz.com> writes:
On Tuesday, 4 March 2025 at 11:25:14 UTC, Paul Backus wrote:
 On Monday, 24 February 2025 at 12:53:30 UTC, zz wrote:
 Hi,

 Is setjmp/longjmp supported under windows?

 Regards,
 zz
It's a standard C function, and Microsoft's online library documentation says that it's supported, so it should work. In D, bindings for standard C headers are available in the `core.stdc` package, so you can access `<setjmp.h>` with `import core.stdc.setjmp;`.
Hi Paul, core.stdc.setjmp; doesn't exist. Regards, zz
Mar 10
parent Paul Backus <snarwin gmail.com> writes:
On Monday, 10 March 2025 at 13:58:08 UTC, zz wrote:
 On Tuesday, 4 March 2025 at 11:25:14 UTC, Paul Backus wrote:
 On Monday, 24 February 2025 at 12:53:30 UTC, zz wrote:
 Hi,

 Is setjmp/longjmp supported under windows?

 Regards,
 zz
It's a standard C function, and Microsoft's online library documentation says that it's supported, so it should work. In D, bindings for standard C headers are available in the `core.stdc` package, so you can access `<setjmp.h>` with `import core.stdc.setjmp;`.
Hi Paul, core.stdc.setjmp; doesn't exist.
Strange. Looks like it's (incorrectly?) included with the POSIX-specific headers, under `core.sys.posix.setjmp`.
Mar 10