epsilon-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Jitter should allow including config.h before including standard headers


From: Jose E. Marchesi
Subject: Jitter should allow including config.h before including standard headers
Date: Sun, 05 Apr 2020 08:55:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Luca, people.

In poke[1] we want to use secure_getenv, which requires having
_GNU_SOURCE defined before including stdlib.h.

Jitter generates this at the top of pvm-vm2.c:

-----------------------------------------------
//#include <config.h>

#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>

/* Early C code from the user. */
#line 122 "../../src/pvm.jitter"
#line 122 "../../src/pvm.jitter"

#   include <config.h>
#   include <stdlib.h>
#   include <string.h>
  /* End of the early C code from the user. */
-----------------------------------------------

As you can see stdbool.h, stdio.h and stdlib.h are included first,
unconditionally.  Note also the commented-out config.h include.

For now I added -D_GNU_SOURCE to the CPPFLAGS used to build
jitter-generated sources, but it would be nice to have early-header-c
placed before these hardcoded includes.  It shit possible?

Thanks!

[1] http://www.jemarch.net/pok




reply via email to

[Prev in Thread] Current Thread [Next in Thread]