Re: Update on the Modern C initiative

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

 



On Sat, 2023-12-02 at 17:33 +0100, Florian Weimer wrote:
> > Specifically, one "configure" (there is used CMake) check tries to
> > figure out whether gethostbyname_r() has five arguments. It does
> > not in
> > Fedora, thus a) there are passed no enough arguments to the
> > function;
> > b) there are incompatible types passed to the function. Both are
> > claimed by gcc. The second is due to the first. The result of this
> > "source compiles" test is correct, the function does not have five
> > arguments.
> 
> I don't see this.  The evolution-data-server-3.50.2-1.fc39 and
> evolution-data-server-3.50.2-1.fc40 have this:
> 
> -- Performing Test HAVE_I_CAL_EMAIL_PARAMETER
> -- Performing Test HAVE_I_CAL_EMAIL_PARAMETER - Success
> 
> While my test build has:
> 
> -- Performing Test HAVE_I_CAL_EMAIL_PARAMETER
> -- Performing Test HAVE_I_CAL_EMAIL_PARAMETER - Failed
> 
> So the test outcome is altered by the new error.

	Hi,
the HAVE_I_CAL_EMAIL_PARAMETER is the b) from the above, aka the
changes uncovered a bug in the configure-time code-compiles check.

The a), an expected failure, is this one:
     .../TryCompile-0C2YRH/src.c: In function ‘main’:
     .../TryCompile-0C2YRH/src.c:11:37: warning: redundant redeclaration of ‘__h_errno_location’ [-Wredundant-decls]
        11 |                                 int h_errno;
           |                                     ^~~~~~~
     /usr/include/netdb.h:59:13: note: previous declaration of ‘__h_errno_location’ with type ‘int *(void)’
        59 | extern int *__h_errno_location (void) __THROW __attribute__ ((__const__));
           |             ^~~~~~~~~~~~~~~~~~
     .../TryCompile-0C2YRH/src.c:12:111: warning: passing argument 7 of ‘gethostbyaddr_r’ from incompatible pointer type [-Wincompatible-pointer-types]
        12 |                                 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno);
           |                                                                                                               ^
           |                                                                                                               |
           |                                                                                                               int *
     /usr/include/netdb.h:174:57: note: expected ‘struct hostent ** restrict’ but argument is of type ‘int *’
       174 |                             struct hostent **__restrict __result,
           |                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
     .../TryCompile-0C2YRH/src.c:12:39: error: too few arguments to function ‘gethostbyaddr_r’
        12 |                                 (void)gethostbyaddr_r ("www.ximian.com", 14, AF_INET, &hent, buffer, bufsize, &h_errno);
           |                                       ^~~~~~~~~~~~~~~
     /usr/include/netdb.h:170:12: note: declared here
       170 | extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
           |            ^~~~~~~~~~~~~~~
     gmake[1]: *** [CMakeFiles/cmTC_3133a.dir/build.make:78: CMakeFiles/cmTC_3133a.dir/src.c.o] Error 1
     gmake[1]: Leaving directory '.../TryCompile-0C2YRH'
     gmake: *** [Makefile:127: cmTC_3133a/fast] Error 2

Note the `too few arguments to function ‘gethostbyaddr_r’` error
follows the `incompatible pointer type` warning, which is going to be
an error after the proposed change.
	Bye,
	Milan
--
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux