groff-commit
[Top][All Lists]
Advanced

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

[groff] 03/14: [eqn]: Improve portability to Clang.


From: G. Branden Robinson
Subject: [groff] 03/14: [eqn]: Improve portability to Clang.
Date: Thu, 22 Feb 2024 17:49:15 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit b0f77e5eaa8616385c5528351d77b24556134e65
Author: Lennart Jablonka <humm@ljabl.com>
AuthorDate: Tue Feb 20 13:44:34 2024 +0000

    [eqn]: Improve portability to Clang.
    
    * src/preproc/eqn/main.cpp: This file includes header <stdlib.h>.  As
      part of the C++ standard library, <stdlib.h> provides a bunch of
      stuff, including `atexit()`, in the global name space; it need not
      provide that stuff in the `std` name space.
    
    See <https://eel.is/c++draft/support.c.headers.other>.
---
 ChangeLog                | 10 ++++++++++
 src/preproc/eqn/main.cpp |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 438c66769..5687abcf5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2024-02-20  Lennart Jablonka <humm@ljabl.com>
+
+       * src/preproc/eqn/main.cpp: This file includes header
+       <stdlib.h>.  As part of the C++ standard library, <stdlib.h>
+       provides a bunch of stuff, including `atexit()`, in the global
+       name space; it need not provide that stuff in the `std` name
+       space.
+
+       See <https://eel.is/c++draft/support.c.headers.other>.
+
 2024-02-17  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/devices/grops/psrm.cpp
diff --git a/src/preproc/eqn/main.cpp b/src/preproc/eqn/main.cpp
index a14ac3632..9db412b2a 100644
--- a/src/preproc/eqn/main.cpp
+++ b/src/preproc/eqn/main.cpp
@@ -427,7 +427,7 @@ int main(int argc, char **argv)
   init_table(device);
   init_char_table();
   init_param_table();
-  std::atexit(free_param_table);
+  atexit(free_param_table);
   printf(".do if !dEQ .ds EQ\n"
         ".do if !dEN .ds EN\n");
   if (output_format == troff) {



reply via email to

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