1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:28:11 +00:00

Ports/perl5: Remove unnecessary drand48 patch

With `drand48` now in LibC, this patch is not needed.
This commit is contained in:
Beckett Normington 2023-08-25 12:27:11 -04:00 committed by Tim Schumacher
parent 8bc1f1b63e
commit eaf7dbaced
6 changed files with 4 additions and 65 deletions

View file

@ -1,56 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Beckett Normington <beckett@b0ba.dev>
Date: Tue, 25 Jul 2023 16:59:20 -0400
Subject: [PATCH] configure: Hardcode `random()` in place of `drand48()`
---
cnf/configure_func.sh | 2 +-
cnf/configure_func_sel.sh | 8 +-------
cnf/configure_misc.sh | 2 +-
3 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/cnf/configure_func.sh b/cnf/configure_func.sh
index 45e11341c0c3cc3563328e06aaafc0b7a50135b4..af7691a848e89b3d18a7dd531f9decf8915e485e 100644
--- a/cnf/configure_func.sh
+++ b/cnf/configure_func.sh
@@ -54,7 +54,7 @@ checkfunc d_dirfd 'dirfd' "NULL" 'dirent.h sys/types.h'
checkfunc d_dladdr 'dladdr' 'NULL, NULL' 'dlfcn.h'
checkfunc d_dlerror 'dlerror' "" 'dlfcn.h'
checkfunc d_dlopen 'dlopen' "NULL,0" "dlfcn.h"
-checkfunc d_drand48 'drand48' "" 'stdlib.h'
+# checkfunc d_drand48 'drand48' "" 'stdlib.h'
checkfunc d_dup2 'dup2' "0,0" 'unistd.h'
checkfunc d_dup3 'dup3' "0,0,0" 'fcntl.h unistd.h'
checkfunc d_duplocale 'duplocale' '0' 'locale.h'
diff --git a/cnf/configure_func_sel.sh b/cnf/configure_func_sel.sh
index 90d350d5451907ba219ad9c817d6ffb25a2178aa..37d433609dbd0289cd1591a60ba60c05ae275084 100644
--- a/cnf/configure_func_sel.sh
+++ b/cnf/configure_func_sel.sh
@@ -53,13 +53,7 @@ fi
mstart "Looking for a random number function"
log "d_drand=$d_drand48 d_random=$d_random d_rand=$d_rand"
-if [ "$d_drand48" = 'define' ]; then
- define randfunc 'drand48'
- define seedfunc 'srand48'
- define randbits 48
- define randseedtype 'long'
- result 'good, found drand48()'
-elif [ "$d_random" = 'define' ]; then
+if [ "$d_random" = 'define' ]; then
define randfunc 'random'
define seedfunc 'srandom'
define randbits 31
diff --git a/cnf/configure_misc.sh b/cnf/configure_misc.sh
index c5dca506ea72fa3693a2d825c0cceb287b26abd8..b2ba57282f7dcc6ea2e889704699ee399bf6a6d5 100644
--- a/cnf/configure_misc.sh
+++ b/cnf/configure_misc.sh
@@ -108,7 +108,7 @@ define spitshell 'cat'
define d_Gconvert 'sprintf((b),"%.*g",(n),(x))'
define d_modfl_pow32_bug 'undef'
define direntrytype 'struct dirent'
-define drand01 'drand48()'
+define drand01 'random()'
define fflushNULL 'define'
define fflushall 'undef'
define freetype 'void'

View file

@ -1,28 +1,23 @@
# Patches for perl5 on SerenityOS
## `0001-configure-Hardcode-random-in-place-of-drand48.patch`
configure: Hardcode `random()` in place of `drand48()`
## `0002-pp_sys-Avoid-redefining-h_errno.patch`
## `0001-pp_sys-Avoid-redefining-h_errno.patch`
pp_sys: Avoid redefining `h_errno`
## `0003-Makefile-Don-t-run-lib-unicore-mktables-with-maketes.patch`
## `0002-Makefile-Don-t-run-lib-unicore-mktables-with-maketes.patch`
Makefile: Don't run `lib/unicore/mktables` with -maketest
This argument causes the interpreter to hang and consume huge amounts
of RAM.
## `0004-Disable-nanosleep.patch`
## `0003-Disable-nanosleep.patch`
Disable nanosleep
## `0005-configure-Add-hint-for-serenity.patch`
## `0004-configure-Add-hint-for-serenity.patch`
configure: Add hint for `serenity`