]> Savannah Git Hosting - gnulib.git/commitdiff
spawn: Use special invocation for <spawn.h> on OS/2 kLIBC.
authorKO Myung-Hun <komh78@gmail.com>
Mon, 18 Jan 2021 16:40:07 +0000 (01:40 +0900)
committerBruno Haible <bruno@clisp.org>
Tue, 19 Jan 2021 17:33:28 +0000 (18:33 +0100)
* lib/spawn.in.h: Use special invocation to include <spawn.h> properly
on OS/2 kLIBC.

ChangeLog
lib/spawn.in.h

index f2e21a4689845b517388c079f57b86008623656f..228a784ce73d157fc48e34e80711bf56c1f61365 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2021-01-19  KO Myung-Hun  <komh78@gmail.com>
+
+       spawn: Use special invocation for <spawn.h> on OS/2 kLIBC.
+       * lib/spawn.in.h: Use special invocation to include <spawn.h> properly
+       on OS/2 kLIBC.
+
 2021-01-18  Bruno Haible  <bruno@clisp.org>
 
        noreturn tests: Avoid test failure on Solaris 10/x86 with cc.
index 326b79e6c948e052f158d622341fb389a3c14f63..35e78e6cffa7a4cbcf0e6dc9dd9d21d6f6521335 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-#ifndef _@GUARD_PREFIX@_SPAWN_H
-
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
+#if defined _GL_ALREADY_INCLUDING_SPAWN_H
+/* Special invocation convention:
+   On OS/2 kLIBC, <spawn.h> includes <signal.h>. Then <signal.h> ->
+   <pthread.h> -> <sched.h> -> <spawn.h> are included by GNULIB.
+   In this situation, struct sched_param is not yet defined.  */
+
+#@INCLUDE_NEXT@ @NEXT_SPAWN_H@
+
+#else
+
+#ifndef _@GUARD_PREFIX@_SPAWN_H
+/* Normal invocation convention.  */
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_SPAWN_H@
+
+# define _GL_ALREADY_INCLUDING_SPAWN_H
+
 # @INCLUDE_NEXT@ @NEXT_SPAWN_H@
+
+# define _GL_ALREADY_INCLUDING_SPAWN_H
+
 #endif
 
 #ifndef _@GUARD_PREFIX@_SPAWN_H
@@ -972,3 +989,4 @@ _GL_WARN_ON_USE (posix_spawn_file_actions_addfchdir,
 
 #endif /* _@GUARD_PREFIX@_SPAWN_H */
 #endif /* _@GUARD_PREFIX@_SPAWN_H */
+#endif