This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/19239] Including stdlib.h ends up with macros major and minor being defined

Dmitry V. Levin <ldv at sourceware dot org> changed:

           What    |Removed                     |Added
                 CC|                            |ldv at sourceware dot org

--- Comment #9 from Dmitry V. Levin <ldv at sourceware dot org> ---
(In reply to Zack Weinberg from comment #8)
> (In reply to Dmitry V. Levin from comment #7) 
> > Autoconf macro AC_HEADER_MAJOR no longer works as expected, it fails to
> > detect that makedev from sys/types.h is deprecated:
> Oh drat.  Would you please post the relevant section of config.log here?

config.log contains nothing interesting:

configure:3207: checking whether sys/types.h defines makedev
configure:3223: gcc -o conftest -g -O2   conftest.c  >&5
configure:3223: $? = 0
configure:3232: result: yes

The test implemented by AC_HEADER_MAJOR is simple: it just tries to compile and
link "makedev(0, 0)".

Here is the relevant part of generated configure script (with empty lines
removed for brevity):

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines
makedev" >&5
$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
if ${ac_cv_header_sys_types_h_makedev+:} false; then :
  $as_echo_n "(cached) " >&6
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
main ()
return makedev(0, 0);
  return 0;
if ac_fn_c_try_link "$LINENO"; then :
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result:
$ac_cv_header_sys_types_h_makedev" >&5
$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
if test $ac_cv_header_sys_types_h_makedev = no; then
ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h"
if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
  if test $ac_cv_header_sys_mkdev_h = no; then
    ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h"
"ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h

You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]