Skip to Content.
Sympa Menu

sm-commit - [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (54e4eafa2ce945601de12e1c3421162ea65dbc2c)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org, sm-commit AT lists.sourcemage.org
  • Subject: [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (54e4eafa2ce945601de12e1c3421162ea65dbc2c)
  • Date: Thu, 13 Jun 2024 11:51:14 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

emulators/virtualxt/HISTORY
| 4

emulators/virtualxt/patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch
| 47 ++++++++--
2 files changed, 42 insertions(+), 9 deletions(-)

New commits:
commit 54e4eafa2ce945601de12e1c3421162ea65dbc2c
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

virtualxt: Update patch

diff --git a/emulators/virtualxt/HISTORY b/emulators/virtualxt/HISTORY
index 407ec33..fff1a03 100644
--- a/emulators/virtualxt/HISTORY
+++ b/emulators/virtualxt/HISTORY
@@ -1,3 +1,7 @@
+2024-06-13 Ismael Luceno <ismael AT sourcemage.org>
+ * patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch:
+ updated patch
+
2024-06-12 Ismael Luceno <ismael AT sourcemage.org>
* BUILD, DEPENDS, DETAILS, INSTALL, PRE_BUILD,
patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch:
diff --git
a/emulators/virtualxt/patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch

b/emulators/virtualxt/patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch
index cb2573d..4779dfa 100644
---
a/emulators/virtualxt/patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch
+++
b/emulators/virtualxt/patches/0001-Define-_POSIX_C_SOURCE-to-expose-popen-pclose.patch
@@ -1,27 +1,56 @@
-From 3120ed5e8a744ea018ad57ea538d3b7aead46b7a Mon Sep 17 00:00:00 2001
+From eea78c9b1cb8e2a2ddffbd5e4cbfa7a11db53c94 Mon Sep 17 00:00:00 2001
From: Ismael Luceno <ismael AT iodev.co.uk>
Date: Fri, 12 Apr 2024 17:47:34 +0200
-Subject: [PATCH] Define _POSIX_C_SOURCE to expose popen/pclose
+Subject: [PATCH] Define _POSIX_C_SOURCE to expose popen & pclose
+
+popen and pclose aren't exposed by musl libc unless one of the following
+macros is defined:
+
+ #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
+ || defined(_X_OPEN_SOURCE) || defined(_GNU_SOURCE) \
+ || defined(_BSD_SOURCE)
+
+According to popen(3) on Linux man-pages 6.05.01:
+
+ Feature Test Macro Requirements for glibc (...):
+
+ popen(), pclose():
+ _POSIX_C_SOURCE >= 2
+ || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
+
+Notes:
+* _POSIX_SOURCE has been superseded by _POSIX_C_SOURCE.
+* _POSIX_C_SOURCE with a value of 2 (POSIX.2-1992) is the option that
+ potentially causes the least namespace contamination.
+* Seems the Mac OS X libc is broken: it hides snprintf/vsnprintf with
+ _POSIX_C_SOURCE == 2, which is presumably wrong.
+
+See feature_test_macros(7) for more information about the macros.

Origin: Source Mage
-Upstream-Status: Pending
+Upstream-Status: Submitted
+ [https://github.com/andreas-jonsson/virtualxt/pull/80]
Signed-off-by: Ismael Luceno <ismael AT iodev.co.uk>
---
- front/sdl/main.c | 1 +
- 1 file changed, 1 insertion(+)
+ front/sdl/main.c | 5 +++++
+ 1 file changed, 5 insertions(+)

diff --git a/front/sdl/main.c b/front/sdl/main.c
-index 8f088aa09e55..0faacad1efb0 100644
+index 8f088aa09e55..6f510fe155b2 100644
--- a/front/sdl/main.c
+++ b/front/sdl/main.c
-@@ -21,6 +21,7 @@
+@@ -21,6 +21,11 @@
//
// 3. This notice may not be removed or altered from any source
distribution.

-+#define _POSIX_C_SOURCE 2
++/* The Mac OS X libc API selection is broken (tested with Xcode 15.0.1) */
++#ifndef __APPLE__
++#define _POSIX_C_SOURCE 2 /* select POSIX.2-1992 to expose popen & pclose */
++#endif
++
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
--
-2.43.0
+2.44.0



  • [[SM-Commit] ] GIT changes to master grimoire by Ismael Luceno (54e4eafa2ce945601de12e1c3421162ea65dbc2c), Ismael Luceno, 06/13/2024

Archive powered by MHonArc 2.6.24.

Top of Page