[Top][All Lists]

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

Re: Feature: C preprocessor supports __func__ or __FUNCTION__?

From: R. Bernstein
Subject: Re: Feature: C preprocessor supports __func__ or __FUNCTION__?
Date: Mon, 29 Jul 2002 17:57:41 -0400

Here is a revised patch and what is in it.

I've added AC_CPP_FUNC to ensure that one can use __func__ in
C-Preprocessor code without worrying about ISO C99 compatibility. This
was in the last patch along with documentation for that. As before, it
was/is added to a newly-created file .../lib/autoconf/cpp.m4

Here's what's new/different:

I've renamed AC_C_STRINGIZE to AC_CPP_STRINGIZE and have moved that
from c.m4 to the newly-created file cpp.m4. There is an alias from
AC_C_STRINGIZE to AC_CPP_STRINGIZE and the documentation has been
updated to reflect this.

I've tried to encorporate Paul Eggert's comment:

  can you please note a portability gotcha
  inherent to the workarounds?  In C99 one can assume that the address
  of __func__ is fixed and unique -- e.g., (__func__ == __func__ &&
  __func__ != "foo") -- but that is not true of the workarounds.

but although I've made a stab at this, frankly I'm not sure I
understand the comment fully nor do I understand ISO C99 semantics
well enough to know say what the difference is between the GNU
__FUNCTION__ and ISO C99 __func__. Paul or someone who understands
this should go over and correct my guess.

In doing the move/rename of AC_CPP_STRINGIZE, I notice that
AT_CHECK_MACRO([AC_C_STRINGIZE]) has been removed from acc.at which
seems to be automatically generated from mktests.sh. I'd like to put
that back along with perhaps AC_CPP_FUNC, but alas I don't understand
the testing mechanism well enough know how to do.

Finally, haven't received word about the FSF papers. My understanding
is that I've filled those out a while ago (same email-address) such as
for xps. If they are not there let me know.

diff -Naur autoconf-2.53/THANKS autoconf-2.53-func-patched/THANKS
--- autoconf-2.53/THANKS        Mon Feb 25 12:32:14 2002
+++ autoconf-2.53-func-patched/THANKS   Mon Jul 15 06:03:28 2002
@@ -142,6 +142,7 @@
 Ralf S. Engelschall         address@hidden
 Richard Stallman            address@hidden
 Robert Lipe                 address@hidden
+Rocky Bernstein             address@hidden
 Robert S. Maier             address@hidden
 Roland McGrath              address@hidden
 Rüdiger Kuhlmann            address@hidden
diff -Naur autoconf-2.53/doc/autoconf.info 
--- autoconf-2.53/doc/autoconf.info     Fri Mar  8 08:00:22 2002
+++ autoconf-2.53-func-patched/doc/autoconf.info        Mon Jul 29 16:25:52 2002
@@ -1,5 +1,5 @@
-Ceci est le fichier Info autoconf.info, produit par Makeinfo version
-4.0j à partir autoconf.texi.
+This is autoconf.info, produced by makeinfo version 4.1 from
@@ -4042,7 +4042,19 @@
      range or precision than the `double' type, define
+ - Macro: AC_CPP_FUNC
+     If the C preprocessor supports the `__func__' variable, do nothing.
+     Otherwise define `__func__' to `__FUNCTION__' if it accepts that,
+     or the empty string (`""') if nothing works.
+     If the compiler supports the ISO C99 standard, one can assume that
+     the address of __func__ is fixed and unique - e.g., (__func__ ==
+     __func__ && __func__ != "foo") for any string value of "foo." If
+     the GCC __FUNCTION__ is not supported, the value of __func__ will
+     be the null string.
      If the C preprocessor supports the stringizing operator, define
      `HAVE_STRINGIZE'.  The stringizing operator is `#' and is found in
      macros such as this:
@@ -9473,6 +9485,10 @@
      non-empty.  Use `AC_MSG_CHECKING' and `AC_MSG_RESULT' instead to
      print messages (*note Printing Messages::).
+     Same as `AC_CPP_STRINGIZE'. The name was changed to be a tad more
+     precise.
  - Macro: AC_CONST
@@ -11805,6 +11821,7 @@
 * Menu:
 * __CHAR_UNSIGNED__:                     C Compiler.
+* __func__:                              C Compiler.
 * __PROTOTYPES:                          C Compiler.
 * _ALL_SOURCE:                           UNIX Variants.
 * _FILE_OFFSET_BITS:                     System Services.
@@ -11948,7 +11965,7 @@
 * C_INLINE:                              C Compiler.
 * C_LONG_DOUBLE:                         C Compiler.
 * C_PROTOTYPES:                          C Compiler.
-* C_STRINGIZE:                           C Compiler.
+* C_STRINGIZE:                           Obsolete Macros.
 * C_VOLATILE:                            C Compiler.
 * CACHE_CHECK:                           Caching Results.
 * CACHE_LOAD:                            Cache Checkpointing.
@@ -11989,6 +12006,8 @@
 * CONFIG_SUBDIRS:                        Subdirectories.
 * CONST:                                 Obsolete Macros.
 * COPYRIGHT:                             Notices.
+* CPP_FUNC:                              C Compiler.
+* CPP_STRINGIZE:                         C Compiler.
 * CROSS_CHECK:                           Obsolete Macros.
 * CYGWIN:                                Obsolete Macros.
 * DECL_SYS_SIGLIST:                      Particular Declarations.
@@ -12441,215 +12460,215 @@
 Tag Table:
-Node: Top1802
-Node: Introduction15384
-Ref: Introduction-Footnote-120225
-Ref: Introduction-Footnote-220306
-Ref: Introduction-Footnote-320406
-Ref: Introduction-Footnote-420520
-Node: The GNU build system20595
-Node: Automake21513
-Node: Libtool23903
-Node: Pointers25323
-Ref: Pointers-Footnote-126632
-Ref: Pointers-Footnote-226691
-Ref: Pointers-Footnote-326750
-Ref: Pointers-Footnote-426807
-Ref: Pointers-Footnote-526948
-Ref: Pointers-Footnote-627022
-Ref: Pointers-Footnote-727094
-Node: Making configure Scripts27169
-Node: Writing configure.ac30210
-Node: Shell Script Compiler31637
-Node: Autoconf Language33900
-Node: configure.ac Layout38523
-Node: autoscan Invocation39918
-Node: ifnames Invocation42360
-Node: autoconf Invocation43554
-Node: autoreconf Invocation50451
-Node: Setup52667
-Node: Initializing configure53926
-Node: Notices55610
-Node: Input57245
-Node: Output58826
-Node: Configuration Actions60798
-Node: Configuration Files65402
-Node: Makefile Substitutions66872
-Node: Preset Output Variables68553
-Node: Installation Directory Variables73609
-Node: Build Directories77963
-Node: Automatic Remaking79606
-Node: Configuration Headers81776
-Node: Header Templates84476
-Node: autoheader Invocation85724
-Node: Autoheader Macros88831
-Node: Configuration Commands91022
-Node: Configuration Links92704
-Node: Subdirectories94076
-Node: Default Prefix96503
-Node: Existing Tests97890
-Node: Common Behavior99607
-Node: Standard Symbols100240
-Node: Default Includes100808
-Node: Alternative Programs102731
-Node: Particular Programs103413
-Node: Generic Programs108360
-Node: Files112269
-Node: Libraries113147
-Node: Library Functions116000
-Node: Function Portability116618
-Node: Particular Functions120369
-Node: Generic Functions131410
-Node: Header Files135639
-Node: Particular Headers136198
-Node: Generic Headers143142
-Node: Declarations145243
-Node: Particular Declarations145827
-Node: Generic Declarations146219
-Node: Structures148623
-Node: Particular Structures149225
-Node: Generic Structures150914
-Node: Types152189
-Node: Particular Types152703
-Node: Generic Types153843
-Node: Compilers and Preprocessors155245
-Node: Specific Compiler Characteristics156313
-Node: Generic Compiler Characteristics157441
-Node: C Compiler158326
-Node: C++ Compiler166449
-Node: Fortran 77 Compiler168676
-Node: System Services177223
-Ref: System Services-Footnote-1180331
-Node: UNIX Variants180422
-Node: Writing Tests181646
-Node: Examining Declarations183577
-Node: Examining Syntax185956
-Node: Examining Libraries187424
-Node: Run Time190498
-Node: Test Programs191474
-Node: Guidelines194272
-Node: Test Functions195462
-Node: Systemology197009
-Ref: Systemology-Footnote-1197631
-Ref: Systemology-Footnote-2197669
-Node: Multiple Cases197737
-Node: Language Choice198989
-Node: Results201011
-Node: Defining Symbols201760
-Node: Setting Output Variables204990
-Node: Caching Results209174
-Node: Cache Variable Names212850
-Node: Cache Files214406
-Node: Cache Checkpointing216426
-Node: Printing Messages217794
-Node: Programming in M4220973
-Node: M4 Quotation221767
-Node: Active Characters222611
-Ref: Active Characters-Footnote-1223959
-Node: One Macro Call223981
-Node: Quotation and Nested Macros225535
-Node: Changequote is Evil228499
-Node: Quadrigraphs231008
-Node: Quotation Rule Of Thumb233060
-Node: Invoking autom4te235691
-Ref: Invoking autom4te-Footnote-1244455
-Node: Programming in M4sugar244503
-Node: Redefined M4 Macros245109
-Node: Evaluation Macros247225
-Node: Forbidden Patterns248261
-Node: Programming in M4sh249613
-Node: Writing Autoconf Macros250150
-Node: Macro Definitions250951
-Node: Macro Names252728
-Node: Reporting Messages255334
-Node: Dependencies Between Macros256668
-Node: Prerequisite Macros257287
-Node: Suggested Ordering260038
-Node: Obsoleting Macros261547
-Node: Coding Style262665
-Node: Portable Shell269675
-Node: Shellology271898
-Node: Here-Documents275276
-Node: File Descriptors277230
-Node: File System Conventions279375
-Ref: File System Conventions-Footnote-1283464
-Node: Shell Substitutions283538
-Node: Assignments288439
-Node: Special Shell Variables290069
-Node: Limitations of Builtins296187
-Node: Limitations of Usual Tools309362
-Node: Limitations of Make323400
-Node: Manual Configuration324621
-Node: Specifying Names325447
-Node: Canonicalizing327730
-Node: Using System Type329973
-Node: Site Configuration331774
-Node: External Software332603
-Node: Package Options335883
-Node: Pretty Help Strings338742
-Node: Site Details340712
-Node: Transforming Names341939
-Node: Transformation Options343016
-Node: Transformation Examples343482
-Node: Transformation Rules345190
-Node: Site Defaults346730
-Node: Running configure scripts350646
-Node: Basic Installation351657
-Node: Compilers and Options354498
-Node: Multiple Architectures355130
-Node: Installation Names356122
-Node: Optional Features357313
-Node: System Type358090
-Node: Sharing Defaults359406
-Node: Defining Variables360037
-Node: configure Invocation360709
-Node: config.status Invocation361831
-Node: Obsolete Constructs365721
-Node: Obsolete config.status Use366649
-Node: acconfig.h368414
-Node: autoupdate Invocation370422
-Node: Obsolete Macros372106
-Node: Autoconf 1388396
-Node: Changed File Names389455
-Node: Changed Makefiles390200
-Node: Changed Macros391282
-Node: Changed Results392528
-Node: Changed Macro Writing394629
-Node: Autoconf 2.13395893
-Node: Changed Quotation397019
-Node: New Macros398893
-Node: Hosts and Cross-Compilation400553
-Node: AC_LIBOBJ vs. LIBOBJS404852
-Ref: AC_LIBOBJ vs. LIBOBJS-Footnote-1407767
-Node: Using Autotest407843
-Node: Using an Autotest Test Suite410284
-Node: testsuite Scripts410567
-Node: Autotest Logs414483
-Ref: Autotest Logs-Footnote-1416851
-Node: Writing testsuite.at417091
-Node: testsuite Invocation420865
-Node: Making testsuite Scripts423952
-Node: Questions427232
-Node: Distributing427748
-Node: Why GNU m4428793
-Node: Bootstrapping429691
-Node: Why Not Imake430297
-Node: History434996
-Node: Genesis435785
-Node: Exodus436958
-Node: Leviticus440001
-Node: Numbers441528
-Node: Deuteronomy443442
-Node: Copying This Manual446108
-Node: GNU Free Documentation License446320
-Node: Indices466188
-Node: Environment Variable Index466806
-Node: Output Variable Index468763
-Node: Preprocessor Symbol Index475300
-Node: Autoconf Macro Index482413
-Node: M4 Macro Index499310
-Node: Autotest Macro Index500434
-Node: Program & Function Index501193
-Node: Concept Index506230
+Node: Top1780
+Node: Introduction15362
+Ref: Introduction-Footnote-120203
+Ref: Introduction-Footnote-220284
+Ref: Introduction-Footnote-320384
+Ref: Introduction-Footnote-420498
+Node: The GNU build system20573
+Node: Automake21491
+Node: Libtool23881
+Node: Pointers25301
+Ref: Pointers-Footnote-126610
+Ref: Pointers-Footnote-226669
+Ref: Pointers-Footnote-326728
+Ref: Pointers-Footnote-426785
+Ref: Pointers-Footnote-526926
+Ref: Pointers-Footnote-627000
+Ref: Pointers-Footnote-727072
+Node: Making configure Scripts27147
+Node: Writing configure.ac30188
+Node: Shell Script Compiler31615
+Node: Autoconf Language33878
+Node: configure.ac Layout38501
+Node: autoscan Invocation39896
+Node: ifnames Invocation42338
+Node: autoconf Invocation43532
+Node: autoreconf Invocation50429
+Node: Setup52645
+Node: Initializing configure53904
+Node: Notices55588
+Node: Input57223
+Node: Output58804
+Node: Configuration Actions60776
+Node: Configuration Files65380
+Node: Makefile Substitutions66850
+Node: Preset Output Variables68531
+Node: Installation Directory Variables73587
+Node: Build Directories77941
+Node: Automatic Remaking79584
+Node: Configuration Headers81754
+Node: Header Templates84454
+Node: autoheader Invocation85702
+Node: Autoheader Macros88809
+Node: Configuration Commands91000
+Node: Configuration Links92682
+Node: Subdirectories94054
+Node: Default Prefix96481
+Node: Existing Tests97868
+Node: Common Behavior99585
+Node: Standard Symbols100218
+Node: Default Includes100786
+Node: Alternative Programs102709
+Node: Particular Programs103391
+Node: Generic Programs108338
+Node: Files112247
+Node: Libraries113125
+Node: Library Functions115978
+Node: Function Portability116596
+Node: Particular Functions120347
+Node: Generic Functions131388
+Node: Header Files135617
+Node: Particular Headers136176
+Node: Generic Headers143120
+Node: Declarations145221
+Node: Particular Declarations145805
+Node: Generic Declarations146197
+Node: Structures148601
+Node: Particular Structures149203
+Node: Generic Structures150892
+Node: Types152167
+Node: Particular Types152681
+Node: Generic Types153821
+Node: Compilers and Preprocessors155223
+Node: Specific Compiler Characteristics156291
+Node: Generic Compiler Characteristics157419
+Node: C Compiler158304
+Node: C++ Compiler166956
+Node: Fortran 77 Compiler169183
+Node: System Services177730
+Ref: System Services-Footnote-1180838
+Node: UNIX Variants180929
+Node: Writing Tests182153
+Node: Examining Declarations184084
+Node: Examining Syntax186463
+Node: Examining Libraries187931
+Node: Run Time191005
+Node: Test Programs191981
+Node: Guidelines194779
+Node: Test Functions195969
+Node: Systemology197516
+Ref: Systemology-Footnote-1198138
+Ref: Systemology-Footnote-2198176
+Node: Multiple Cases198244
+Node: Language Choice199496
+Node: Results201518
+Node: Defining Symbols202267
+Node: Setting Output Variables205497
+Node: Caching Results209681
+Node: Cache Variable Names213357
+Node: Cache Files214913
+Node: Cache Checkpointing216933
+Node: Printing Messages218301
+Node: Programming in M4221480
+Node: M4 Quotation222274
+Node: Active Characters223118
+Ref: Active Characters-Footnote-1224466
+Node: One Macro Call224488
+Node: Quotation and Nested Macros226042
+Node: Changequote is Evil229006
+Node: Quadrigraphs231515
+Node: Quotation Rule Of Thumb233567
+Node: Invoking autom4te236198
+Ref: Invoking autom4te-Footnote-1244962
+Node: Programming in M4sugar245010
+Node: Redefined M4 Macros245616
+Node: Evaluation Macros247732
+Node: Forbidden Patterns248768
+Node: Programming in M4sh250120
+Node: Writing Autoconf Macros250657
+Node: Macro Definitions251458
+Node: Macro Names253235
+Node: Reporting Messages255841
+Node: Dependencies Between Macros257175
+Node: Prerequisite Macros257794
+Node: Suggested Ordering260545
+Node: Obsoleting Macros262054
+Node: Coding Style263172
+Node: Portable Shell270182
+Node: Shellology272405
+Node: Here-Documents275783
+Node: File Descriptors277737
+Node: File System Conventions279882
+Ref: File System Conventions-Footnote-1283971
+Node: Shell Substitutions284045
+Node: Assignments288946
+Node: Special Shell Variables290576
+Node: Limitations of Builtins296694
+Node: Limitations of Usual Tools309869
+Node: Limitations of Make323907
+Node: Manual Configuration325128
+Node: Specifying Names325954
+Node: Canonicalizing328237
+Node: Using System Type330480
+Node: Site Configuration332281
+Node: External Software333110
+Node: Package Options336390
+Node: Pretty Help Strings339249
+Node: Site Details341219
+Node: Transforming Names342446
+Node: Transformation Options343523
+Node: Transformation Examples343989
+Node: Transformation Rules345697
+Node: Site Defaults347237
+Node: Running configure scripts351153
+Node: Basic Installation352164
+Node: Compilers and Options355005
+Node: Multiple Architectures355637
+Node: Installation Names356629
+Node: Optional Features357820
+Node: System Type358597
+Node: Sharing Defaults359913
+Node: Defining Variables360544
+Node: configure Invocation361216
+Node: config.status Invocation362338
+Node: Obsolete Constructs366228
+Node: Obsolete config.status Use367156
+Node: acconfig.h368921
+Node: autoupdate Invocation370929
+Node: Obsolete Macros372613
+Node: Autoconf 1389014
+Node: Changed File Names390073
+Node: Changed Makefiles390818
+Node: Changed Macros391900
+Node: Changed Results393146
+Node: Changed Macro Writing395247
+Node: Autoconf 2.13396511
+Node: Changed Quotation397637
+Node: New Macros399511
+Node: Hosts and Cross-Compilation401171
+Node: AC_LIBOBJ vs. LIBOBJS405470
+Ref: AC_LIBOBJ vs. LIBOBJS-Footnote-1408385
+Node: Using Autotest408461
+Node: Using an Autotest Test Suite410902
+Node: testsuite Scripts411185
+Node: Autotest Logs415101
+Ref: Autotest Logs-Footnote-1417469
+Node: Writing testsuite.at417709
+Node: testsuite Invocation421483
+Node: Making testsuite Scripts424570
+Node: Questions427850
+Node: Distributing428366
+Node: Why GNU m4429411
+Node: Bootstrapping430309
+Node: Why Not Imake430915
+Node: History435614
+Node: Genesis436403
+Node: Exodus437576
+Node: Leviticus440619
+Node: Numbers442146
+Node: Deuteronomy444060
+Node: Copying This Manual446726
+Node: GNU Free Documentation License446938
+Node: Indices466806
+Node: Environment Variable Index467424
+Node: Output Variable Index469381
+Node: Preprocessor Symbol Index475918
+Node: Autoconf Macro Index483084
+Node: M4 Macro Index500092
+Node: Autotest Macro Index501216
+Node: Program & Function Index501975
+Node: Concept Index507012
 End Tag Table
diff -Naur autoconf-2.53/doc/autoconf.texi 
--- autoconf-2.53/doc/autoconf.texi     Fri Mar  8 07:57:41 2002
+++ autoconf-2.53-func-patched/doc/autoconf.texi        Mon Jul 29 16:23:31 2002
@@ -4903,8 +4903,23 @@
 @end defmac
address@hidden AC_C_STRINGIZE
address@hidden C_STRINGIZE
address@hidden AC_CPP_FUNC
address@hidden CPP_FUNC
address@hidden __func__
+If the C preprocessor supports the @code{__func__} variable, do nothing.
+Otherwise define @code{__func__} to @code{__FUNCTION__} if it accepts that, or
+the empty string (@code{""}) if nothing works. 
+If the compiler supports the ISO C99 standard, one can assume that the
+address of __func__ is fixed and unique -- e.g., (__func__ == __func__
+&& __func__ != "foo") for any string value of ``foo.'' If the GCC
+__FUNCTION__ is not supported, the value of __func__ will be the null
address@hidden defmac
address@hidden AC_CPP_STRINGIZE
address@hidden CPP_STRINGIZE
 If the C preprocessor supports the stringizing operator, define
 @code{HAVE_STRINGIZE}.  The stringizing operator is @samp{#} and is
@@ -10986,6 +11001,12 @@
 to print messages (@pxref{Printing Messages}).
 @end defmac
address@hidden AC_C_STRINGIZE
address@hidden C_STRINGIZE
+Same as @code{AC_CPP_STRINGIZE}. The name was changed to be a tad more
address@hidden defmac
 @defmac AC_CONST
 @acindex CONST
diff -Naur autoconf-2.53/doc/stamp-vti autoconf-2.53-func-patched/doc/stamp-vti
--- autoconf-2.53/doc/stamp-vti Fri Mar  8 08:10:30 2002
+++ autoconf-2.53-func-patched/doc/stamp-vti    Mon Jul 29 16:25:52 2002
@@ -1,4 +1,4 @@
address@hidden UPDATED 8 March 2002
address@hidden UPDATED-MONTH March 2002
address@hidden UPDATED 29 July 2002
address@hidden UPDATED-MONTH July 2002
 @set EDITION 2.53
 @set VERSION 2.53
diff -Naur autoconf-2.53/doc/version.texi 
--- autoconf-2.53/doc/version.texi      Fri Mar  8 08:00:21 2002
+++ autoconf-2.53-func-patched/doc/version.texi Mon Jul 29 16:25:52 2002
@@ -1,4 +1,4 @@
address@hidden UPDATED 8 March 2002
address@hidden UPDATED-MONTH March 2002
address@hidden UPDATED 29 July 2002
address@hidden UPDATED-MONTH July 2002
 @set EDITION 2.53
 @set VERSION 2.53
diff -Naur autoconf-2.53/lib/autoconf/Makefile.am 
--- autoconf-2.53/lib/autoconf/Makefile.am      Tue Feb  5 03:16:36 2002
+++ autoconf-2.53-func-patched/lib/autoconf/Makefile.am Mon Jul 15 05:50:31 2002
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
-## Copyright 2001 Free Software Foundation, Inc.
+## Copyright 2002 Free Software Foundation, Inc.
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
        autoconf.m4 \
         general.m4 status.m4 oldnames.m4 specific.m4 \
        autoheader.m4 autoupdate.m4 autotest.m4 \
-       lang.m4 c.m4 fortran.m4 \
+       lang.m4 c.m4 cpp.m4 fortran.m4 \
         functions.m4 headers.m4 types.m4 libs.m4 programs.m4
 nodist_autoconflib_DATA = autoconf.m4f
diff -Naur autoconf-2.53/lib/autoconf/c.m4 
--- autoconf-2.53/lib/autoconf/c.m4     Mon Mar  4 09:34:20 2002
+++ autoconf-2.53-func-patched/lib/autoconf/c.m4        Mon Jul 29 16:07:10 2002
@@ -1033,26 +1033,6 @@
-# --------------
-# Checks if `#' can be used to glue strings together at the CPP level.
-# Defines HAVE_STRINGIZE if positive.
-[AC_CACHE_CHECK([for preprocessor stringizing operator],
-                [ac_cv_c_stringize],
-              address@hidden:@define x(y) #y
-char *s = x(teststring);],
-              [ac_cv_c_stringize=no],
-              [ac_cv_c_stringize=yes])])
-if test $ac_cv_c_stringize = yes; then
-            [Define to 1 if cpp supports the ANSI @%:@ stringizing operator.])
 # ---------------
 # Check if the C compiler supports prototypes, included if it needs
diff -Naur autoconf-2.53/lib/autoconf/cpp.m4 
--- autoconf-2.53/lib/autoconf/cpp.m4   Wed Dec 31 19:00:00 1969
+++ autoconf-2.53-func-patched/lib/autoconf/cpp.m4      Mon Jul 29 16:04:08 2002
@@ -0,0 +1,96 @@
+# This file is part of Autoconf.                       -*- Autoconf -*-
+# Programming languages support.
+# Copyright 2002
+# Free Software Foundation, Inc.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf.  You need not follow the terms of the GNU
+# General Public License when using or distributing such scripts, even
+# though portions of the text of Autoconf appear in them.  The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case.  We call these
+# comments and executable code the "non-data" portions.  Autoconf never
+# copies any of the non-data portions into its output.
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation.  When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with.  (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.)  If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+# ------------------ #
+# The C Preprocessor #
+# ------------------ #
+# ------------------ #
+# Checks to see if ANSI C99 CPP variable __func__ works.
+# If not, perhaps __FUNCTION__ works instead. 
+# If not, we'll just define __func__ to "". 
+AC_CACHE_CHECK([for an ANSI C99-conforming __func__], ac_cv_cpp_func,
+[[char *foo = __func__;]])],
+  [ac_cv_cpp_func=yes], 
+[[char *foo = __FUNCTION__;]])],
+  [ac_cv_cpp_func=__FUNCTION__], 
+  [ac_cv_cpp_func=no])])])
+if test $ac_cv_cpp_func = __FUNCTION__; then
+  AC_DEFINE(__func__,__FUNCTION__,
+            [Define to __FUNCTION__ or "" if `__func__' does not conform to 
+elif test $ac_cv_cpp_func = no; then
+  AC_DEFINE(__func__,"",
+            [Define to __FUNCTION__ or "" if `__func__' does not conform to 
+# --------------
+# Checks if `#' can be used to glue strings together at the CPP level.
+# Defines HAVE_STRINGIZE if positive.
+[AC_CACHE_CHECK([for preprocessor stringizing operator],
+                [ac_cv_c_stringize],
+              address@hidden:@define x(y) #y
+char *s = x(teststring);],
+              [ac_cv_c_stringize=no],
+              [ac_cv_c_stringize=yes])])
+if test $ac_cv_c_stringize = yes; then
+            [Define to 1 if cpp supports the ANSI @%:@ stringizing operator.])
diff -Naur autoconf-2.53/lib/autoconf/oldnames.m4 
--- autoconf-2.53/lib/autoconf/oldnames.m4      Mon Aug 20 10:49:20 2001
+++ autoconf-2.53-func-patched/lib/autoconf/oldnames.m4 Mon Jul 29 16:07:05 2002
@@ -72,6 +72,7 @@
 ## Specific macros of Autoconf.  ##
 ## ----------------------------- ##
 AU_ALIAS([AC_CONST],           [AC_C_CONST])
diff -Naur autoconf-2.53/tests/Makefile.am 
--- autoconf-2.53/tests/Makefile.am     Tue Feb  5 03:28:20 2002
+++ autoconf-2.53-func-patched/tests/Makefile.am        Mon Jul 29 16:38:52 2002
@@ -118,6 +118,7 @@
                  $(autoconfdir)/functions.m4 \
                  $(autoconfdir)/lang.m4 \
                  $(autoconfdir)/c.m4 \
+                 $(autoconfdir)/cpp.m4 \
                  $(autoconfdir)/fortran.m4 \
                  $(autoconfdir)/headers.m4 \
                  $(autoconfdir)/libs.m4 \
diff -Naur autoconf-2.53/tests/acc.at autoconf-2.53-func-patched/tests/acc.at
--- autoconf-2.53/tests/acc.at  Mon Mar  4 10:16:29 2002
+++ autoconf-2.53-func-patched/tests/acc.at     Mon Jul 29 16:26:01 2002
@@ -8,7 +8,6 @@

reply via email to

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