mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 09:20:28 +03:00
Ports: Remove two getprogname patches that are no longer needed
This commit is contained in:
parent
2e0ed98bc5
commit
7e245b74f1
Notes:
sideshowbarker
2024-07-17 09:41:18 +09:00
Author: https://github.com/timschumi Commit: https://github.com/SerenityOS/serenity/commit/7e245b74f1 Pull-request: https://github.com/SerenityOS/serenity/pull/14837 Reviewed-by: https://github.com/bgianfo ✅
@ -1,64 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ali Mohammad Pur <ali.mpfard@gmail.com>
|
||||
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
|
@ -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
|
||||
|
||||
|
@ -1,37 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Kling <kling@serenityos.org>
|
||||
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 <sys/procfs.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __serenity__
|
||||
+# include <unistd.h>
|
||||
+#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
|
@ -10,8 +10,3 @@ Include ar.h for serenity as well
|
||||
Stub getdtablesize() for serenity
|
||||
|
||||
|
||||
## `0003-Implement-getprogname.patch`
|
||||
|
||||
Implement getprogname()
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user