gbranden pushed a commit to branch master
in repository groff.
commit 133ca2a7710af394fb41f930c7b369c3860bc287
Author: G. Branden Robinson <[email protected]>
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 <[email protected]>
+
+ * 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 <[email protected]>
* 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"
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit