[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[groff] 25/80: src/roff/troff/node.cpp: Fix inclusion wart.
From: |
G. Branden Robinson |
Subject: |
[groff] 25/80: src/roff/troff/node.cpp: Fix inclusion wart. |
Date: |
Sat, 30 Nov 2024 04:02:16 -0500 (EST) |
gbranden pushed a commit to branch master
in repository groff.
commit 1d38234d4ef847f383b40f639b9608a839f02c15
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Nov 27 16:09:23 2024 -0600
src/roff/troff/node.cpp: Fix inclusion wart.
* src/roff/troff/node.cpp: Fix inclusion wart. Include local "posix.h"
header before "nonposix.h". This aligns better with other groff code,
and more importantly, "posix.h" itself includes "<unistd.h>", which
defines `_POSIX_VERSION` on POSIX systems, and in turn prevents us
from provoking compiler warnings by redeclaring `WIFEXITED` et al. in
this file.
---
ChangeLog | 9 +++++++++
src/include/posix.h | 7 ++++++-
src/roff/troff/node.cpp | 1 +
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index bc7090c6a..8fef8e97b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
+
+ * src/roff/troff/node.cpp: Fix inclusion wart. Include local
+ "posix.h" header before "nonposix.h". This aligns better with
+ other groff code, and more importantly, "posix.h" itself
+ includes "<unistd.h>", which defines `_POSIX_VERSION` on POSIX
+ systems, and in turn prevents us from provoking compiler
+ warnings by redeclaring `WIFEXITED` et al. in this file.
+
2024-11-27 G. Branden Robinson <g.branden.robinson@gmail.com>
* src/include/ptable.h: Include "<stdlib.h>" header, since the
diff --git a/src/include/posix.h b/src/include/posix.h
index 81c2d2276..6e5ab62ce 100644
--- a/src/include/posix.h
+++ b/src/include/posix.h
@@ -1,4 +1,3 @@
-// -*- C++ -*-
/* Copyright (C) 1992-2020 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.com)
@@ -64,3 +63,9 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#ifndef HAVE_ISATTY
#define isatty(n) (1)
#endif
+
+// Local Variables:
+// fill-column: 72
+// mode: C++
+// End:
+// vim: set cindent noexpandtab shiftwidth=2 textwidth=72:
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 2c3a25cbf..ca5faa45b 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -39,6 +39,7 @@ along with this program. If not, see
<http://www.gnu.org/licenses/>. */
#include "input.h"
#include "geometry.h"
+#include "posix.h"
#include "nonposix.h"
#ifdef _POSIX_VERSION
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [groff] 25/80: src/roff/troff/node.cpp: Fix inclusion wart.,
G. Branden Robinson <=