autoconf
[Top][All Lists]
Advanced

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

Anyone remember what AC_PROG_GCC_TRADITIONAL was testing for?


From: Zack Weinberg
Subject: Anyone remember what AC_PROG_GCC_TRADITIONAL was testing for?
Date: Sun, 02 Apr 2023 16:16:04 -0400
User-agent: Cyrus-JMAP/3.9.0-alpha0-238-g746678b8b6-fm-20230329.001-g746678b8

After the AC_TYPE_GETGROUPS patch I just sent and one more
I have stacked up locally, the very last use of AC_EGREP_CPP
and/or AC_EGREP_HEADER in a stock Autoconf macro will be in
AC_PROG_GCC_TRADITIONAL, which does this:

AC_DEFUN([AC_PROG_GCC_TRADITIONAL],
[AC_REQUIRE([AC_PROG_CC])dnl
if test $ac_cv_c_compiler_gnu = yes; then
    AC_CACHE_CHECK(whether $CC needs -traditional,
      ac_cv_prog_gcc_traditional,
[  ac_pattern="Autoconf.*'x'"
  AC_EGREP_CPP($ac_pattern, [#include <sgtty.h>
Autoconf TIOCGETP],
  ac_cv_prog_gcc_traditional=yes, ac_cv_prog_gcc_traditional=no)

  if test $ac_cv_prog_gcc_traditional = no; then
    AC_EGREP_CPP($ac_pattern, [#include <termio.h>
Autoconf TCGETA],
    ac_cv_prog_gcc_traditional=yes)
  fi])
  if test $ac_cv_prog_gcc_traditional = yes; then
    CC="$CC -traditional"
  fi
fi
])# AC_PROG_GCC_TRADITIONAL


This is logic from solidly before my time -- I only have personal
experience with the generation of Unixes including SunOS 4.1 and later.
However, it looks to me as though this is testing for a problem with
very old <sgtty.h> and/or <termio.h>, which wouldn't define some of the
macros they were supposed to define if preprocessed by an ISO C -
compliant compiler.

Does anyone remember enough to know if that guess is accurate?  Do you
remember which systems were affected?  I presume they would've had
their own C compiler and this was in aid of using GCC as a third-
party compiler.

Given that we are officially dropping support for "traditional" C
compilers as of the planned 2.73, and also given that GCC hasn't
supported compilation in -traditional mode since, um, 2001 give
or take a year, IIRC... Should we just delete this entire thing,
or does it still serve a purpose somehow?

zw



reply via email to

[Prev in Thread] Current Thread [Next in Thread]