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 b0912f1787..0000000000 --- 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 cb5b371136..3f6ddf37a5 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 a3e1d1cf96..0000000000 --- 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 4816278ae7..b4c5657d4a 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() - -