From 7e245b74f1d5137e2d3e9f20697f6b9176aff9b2 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 12 Aug 2022 01:03:27 +0200 Subject: [PATCH] Ports: Remove two getprogname patches that are no longer needed --- ...0001-Stub-out-some-wctype-functions.patch} | 0 ...b-out-the-getprogname-implementation.patch | 64 ------------------- Ports/gettext/patches/ReadMe.md | 7 +- .../patches/0003-Implement-getprogname.patch | 37 ----------- Ports/make/patches/ReadMe.md | 5 -- 5 files changed, 1 insertion(+), 112 deletions(-) rename Ports/gettext/patches/{0002-Stub-out-some-wctype-functions.patch => 0001-Stub-out-some-wctype-functions.patch} (100%) delete mode 100644 Ports/gettext/patches/0001-Stub-out-the-getprogname-implementation.patch delete mode 100644 Ports/make/patches/0003-Implement-getprogname.patch diff --git a/Ports/gettext/patches/0002-Stub-out-some-wctype-functions.patch b/Ports/gettext/patches/0001-Stub-out-some-wctype-functions.patch similarity index 100% rename from Ports/gettext/patches/0002-Stub-out-some-wctype-functions.patch rename to Ports/gettext/patches/0001-Stub-out-some-wctype-functions.patch diff --git a/Ports/gettext/patches/0001-Stub-out-the-getprogname-implementation.patch b/Ports/gettext/patches/0001-Stub-out-the-getprogname-implementation.patch deleted file mode 100644 index b0912f1787d..00000000000 --- a/Ports/gettext/patches/0001-Stub-out-the-getprogname-implementation.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Ali Mohammad Pur -Date: Mon, 16 May 2022 15:44:53 +0430 -Subject: [PATCH] Stub out the getprogname() implementation - ---- - gettext-runtime/gnulib-lib/getprogname.c | 2 ++ - gettext-tools/gnulib-lib/getprogname.c | 2 ++ - gettext-tools/libgettextpo/getprogname.c | 2 ++ - libtextstyle/lib/getprogname.c | 2 ++ - 4 files changed, 8 insertions(+) - -diff --git a/gettext-runtime/gnulib-lib/getprogname.c b/gettext-runtime/gnulib-lib/getprogname.c -index 5e6f764..e800b89 100644 ---- a/gettext-runtime/gnulib-lib/getprogname.c -+++ b/gettext-runtime/gnulib-lib/getprogname.c -@@ -245,6 +245,8 @@ getprogname (void) - } - } - return NULL; -+# elif defined(__serenity__) -+ return NULL; - # else - # error "getprogname module not ported to this OS" - # endif -diff --git a/gettext-tools/gnulib-lib/getprogname.c b/gettext-tools/gnulib-lib/getprogname.c -index 5e6f764..e800b89 100644 ---- a/gettext-tools/gnulib-lib/getprogname.c -+++ b/gettext-tools/gnulib-lib/getprogname.c -@@ -245,6 +245,8 @@ getprogname (void) - } - } - return NULL; -+# elif defined(__serenity__) -+ return NULL; - # else - # error "getprogname module not ported to this OS" - # endif -diff --git a/gettext-tools/libgettextpo/getprogname.c b/gettext-tools/libgettextpo/getprogname.c -index 5e6f764..e800b89 100644 ---- a/gettext-tools/libgettextpo/getprogname.c -+++ b/gettext-tools/libgettextpo/getprogname.c -@@ -245,6 +245,8 @@ getprogname (void) - } - } - return NULL; -+# elif defined(__serenity__) -+ return NULL; - # else - # error "getprogname module not ported to this OS" - # endif -diff --git a/libtextstyle/lib/getprogname.c b/libtextstyle/lib/getprogname.c -index 5e6f764..e800b89 100644 ---- a/libtextstyle/lib/getprogname.c -+++ b/libtextstyle/lib/getprogname.c -@@ -245,6 +245,8 @@ getprogname (void) - } - } - return NULL; -+# elif defined(__serenity__) -+ return NULL; - # else - # error "getprogname module not ported to this OS" - # endif diff --git a/Ports/gettext/patches/ReadMe.md b/Ports/gettext/patches/ReadMe.md index cb5b3711368..3f6ddf37a5f 100644 --- a/Ports/gettext/patches/ReadMe.md +++ b/Ports/gettext/patches/ReadMe.md @@ -1,11 +1,6 @@ # Patches for gettext on SerenityOS -## `0001-Stub-out-the-getprogname-implementation.patch` - -Stub out the getprogname() implementation - - -## `0002-Stub-out-some-wctype-functions.patch` +## `0001-Stub-out-some-wctype-functions.patch` Stub out some wctype functions diff --git a/Ports/make/patches/0003-Implement-getprogname.patch b/Ports/make/patches/0003-Implement-getprogname.patch deleted file mode 100644 index a3e1d1cf967..00000000000 --- a/Ports/make/patches/0003-Implement-getprogname.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Andreas Kling -Date: Tue, 15 Dec 2020 01:06:18 +0100 -Subject: [PATCH] Implement getprogname() - ---- - lib/getprogname.c | 10 ++++++++++ - 1 file changed, 10 insertions(+) - -diff --git a/lib/getprogname.c b/lib/getprogname.c -index 9f69f5a..e5adb23 100644 ---- a/lib/getprogname.c -+++ b/lib/getprogname.c -@@ -51,6 +51,10 @@ - # include - #endif - -+#ifdef __serenity__ -+# include -+#endif -+ - #include "dirname.h" - - #ifndef HAVE_GETPROGNAME /* not Mac OS X, FreeBSD, NetBSD, OpenBSD >= 5.4, Cygwin */ -@@ -245,6 +249,12 @@ getprogname (void) - } - } - return NULL; -+# elif defined __serenity__ -+ char* buffer = malloc(1024); -+ if (get_process_name(buffer, 1024) < 0) -+ return NULL; -+ return buffer; -+ - # else - # error "getprogname module not ported to this OS" - # endif diff --git a/Ports/make/patches/ReadMe.md b/Ports/make/patches/ReadMe.md index 4816278ae70..b4c5657d4a7 100644 --- a/Ports/make/patches/ReadMe.md +++ b/Ports/make/patches/ReadMe.md @@ -10,8 +10,3 @@ Include ar.h for serenity as well Stub getdtablesize() for serenity -## `0003-Implement-getprogname.patch` - -Implement getprogname() - -