On Fri, Nov 21, 2025 at 08:13:57PM -0600, Kenneth Pronovici wrote:
> Package: cproto
> Version: 4.7x-1
> Severity: normal
> Tags: upstream
...
> I found the utility 'cproto' throws a warning when processing c source
> files with embedded #include <sys/types.h>, e.g.:
> 
> $ cproto mkdirpath.c
> /* mkdirpath.c */
> /usr/include/linux/types.h:12: syntax error at token '__s128'
> Expected: ';'
> int mkPath(const char *path, const char *user, const char *group, int mode);
> int checkPath(const char *path, const char *user, const char *group,
> int mode, int cflag, char **fail);
> 
> This error can be reproduced on debian trixie, 'x86_64-linux-gnu'
> (intel) and  'arm-linux-gnueabihf' (raspberry-pi) platform.
> The installed cproto packet is cproto_4.7x-1_amd64.deb.
> The error occured first after update from debian bookworm to trixie
> and I suspect types.h is the culprit.
> Unfortuantely it's beyond my skills to dig into these header files.

/usr/include/linux/types.h at line 12 has this:

#ifdef __SIZEOF_INT128__
typedef __signed__ __int128 __s128 __attribute__((aligned(16)));
typedef unsigned __int128 __u128 __attribute__((aligned(16)));
#endif

which uses gcc "extensions" (i.e., alternate spellings of standard C keywords
used to help people write non-portable code).  cproto has a few of those.

https://github.com/ThomasDickey/cproto-snapshots/blob/master/keywords.gperf

This page lists some more, which gcc added since the last time this problem
was pointed out:

https://www.gnu.org/software/gnu-c-manual/gnu-c-manual.html#Keywords

clang lists some, but doesn't bother to point out which are "extensions":

https://clang.llvm.org/docs/LanguageExtensions.html

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to