I'm not sure that the answer to my own question is accepted behavior, but while I was looking for a solution, and not just expecting someone else to do my homework, I think it will be useful for other people reading this.
Soon, the answer to my question is the -D_GNU_SOURCE
flag of the gcc compiler, and it seems that the threads have nothing to do with this type of off64_t
.
It appears that when -Dusethreads
used for Configure
, hints/linux.sh
and the following code is executed:
case "$usethreads" in $define|true|[yY]*) ccflags="-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS $ccflags"
then the code is compiled using _GNU_SOURCE
, which allows you to use a lot of things (for example, the answer in this thread: What does "#define _GNU_SOURCE" mean? ).
When Perl is created without thread support, these flags are skipped and many bits from the header files remain commented out.
Perl doesn't seem to be affected. Even older versions of Apache were not, but Apache 2.2+ started using code that _GNU_SOURCE
included, and building mod_perl
not as simple as before.
I do not know who should do this. Maybe the main Perl-supporting ones themselves, maybe Apache helpers, maybe no one, and this is just a question about my case or compiler.
Conclusion: when creating non-streaming Perl _GNU_SOURCE
not used, as a result, Perl .h
files contain many #define
comments and cannot create mod_perl for Apache 2.2+ sources. When creating Perl, you must add the additional -Accflags='-D_GNU_SOURCE'
.
Other answers are welcome. Maybe I'm wrong or just see the tip of the iceberg.