groff-commit
[Top][All Lists]
Advanced

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

[groff] 73/80: [indxbib]: Improve header file hygiene.


From: G. Branden Robinson
Subject: [groff] 73/80: [indxbib]: Improve header file hygiene.
Date: Sat, 30 Nov 2024 04:02:29 -0500 (EST)

gbranden pushed a commit to branch master
in repository groff.

commit 133ca2a7710af394fb41f930c7b369c3860bc287
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Sat Nov 30 00:29:56 2024 -0600

    [indxbib]: Improve header file hygiene.
    
    * src/utils/indxbib/indxbib.cpp: Include local "nonposix.h" header file,
      to try to ensure visibility of `getcwd()` symbol on non-POSIX systems.
    
    The only such declaration present there is conditioned on `__EMX__`
    though, which for those born after 1990, was a (sort of?) POSIX layer
    for IBM OS/2.  This shouldn't make the situation _worse_.  Why haven't
    the numerous OS/2 users indexing their bibliographic reference files to
    speed up refer(1) preprocessing with groff in 2024 complained to us?
---
 ChangeLog                     | 6 ++++++
 src/utils/indxbib/indxbib.cpp | 5 ++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index a51b39368..3b06af010 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-11-30  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       * src/utils/indxbib/indxbib.cpp: Include local "nonposix.h"
+       header file, to try to ensure visibility of `getcwd()` symbol on
+       non-POSIX systems.
+
 2024-11-30  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/roff/groff/pipeline.c: Sort (and annotate) inclusions of
diff --git a/src/utils/indxbib/indxbib.cpp b/src/utils/indxbib/indxbib.cpp
index 1ac356187..115175b93 100644
--- a/src/utils/indxbib/indxbib.cpp
+++ b/src/utils/indxbib/indxbib.cpp
@@ -28,12 +28,15 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
                   // ungetc()
 #include <string.h> // strerror()
 #ifdef HAVE_UNISTD_H
-#include <unistd.h> // getcwd(), unlink()
+#include <unistd.h> // unlink()
 #endif
 
 #include "lib.h"
 
+// needed for getcwd()
 #include "posix.h"
+#include "nonposix.h"
+
 #include "errarg.h"
 #include "error.h"
 #include "stringclass.h"



reply via email to

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