On Tue, 11 Jun 2024, FX Coudert wrote:

> Hi
> 
> I can’t seem to get a review of this one-line patch. Could a global reviewer 
> help?

While stdio.h can be relied on to exist I do not think you can assume
the same for sys/types.h without "configury", but libgccjit.h is an
installed API.  I would assume including stdlib.h gets you ssize_t as 
well?  In fact the C11 standard doesn't even mention ssize_t so the
API should probably avoid using it and instead use size_t for

/* Given type "T", get its size.
   This API entrypoint was added in LIBGCCJIT_ABI_20; you can test for its
   presence using
     #ifdef LIBGCCJIT_HAVE_SIZED_INTEGERS  */
extern ssize_t
gcc_jit_type_get_size (gcc_jit_type *type);

Richard.



> Thanks,
>
> FX
> 
> 
> 
> ping**3
> 
> 
> > Le 11 mai 2024 à 17:16, FX Coudert <fxcoud...@gmail.com> a écrit :
> > 
> > Hi,
> > 
> > On some targets it seems that ssize_t is not defined by any of the headers 
> > transitively included by <stdio.h>. This leads to a bootstrap fail when jit 
> > is enabled. The attached patch fixes it by include <sys/types.h>. Other 
> > headers in GCC treat <sys/types.h> as available on all targets, so we 
> > include it unconditionally.
> > 
> > Tested on x86_64-darwin and x86_64-linux. OK to push?
> > 
> > FX
> > 
> 

-- 
Richard Biener <rguent...@suse.de>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Ivo Totev, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to