moria: Avoid declaring own getuid/getgid

This commit is contained in:
nia 2023-07-09 22:14:42 +00:00
parent e914e0dc3c
commit 3338b27c12
5 changed files with 76 additions and 31 deletions

View File

@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.23 2020/09/02 22:16:48 kim Exp $
# $NetBSD: Makefile,v 1.24 2023/07/09 22:14:42 nia Exp $
DISTNAME= um5.5.2
PKGNAME= moria-5.5.2
PKGREVISION= 6
PKGREVISION= 7
CATEGORIES= games
# The "offical" master site has lost the pub/Games directory.
#MASTER_SITES= ftp://ftp.cis.ksu.edu/pub/Games/Moria/source/

View File

@ -1,15 +1,15 @@
$NetBSD: distinfo,v 1.17 2021/10/26 10:44:16 nia Exp $
$NetBSD: distinfo,v 1.18 2023/07/09 22:14:42 nia Exp $
BLAKE2s (um5.5.2.tar.Z) = 280c35e5778cf4f268d3e29235db400e1147577a1fb770bcabc1d95d734c8e5c
SHA512 (um5.5.2.tar.Z) = 987bbccb9cb4870ec91704cd20cf19875320d1cfe62c4c5a0063bfc3827732a0e3334a4ea3712137f3262d7418db0ea7e803d724e2dec4d5eb41ebe741f326cc
Size (um5.5.2.tar.Z) = 910536 bytes
SHA1 (patch-aa) = 45338539960c193e9f7556aa6a588cf40bfbe726
SHA1 (patch-ab) = 21418a69d7a694894dd9408513693f87fff91953
SHA1 (patch-ab) = 9f5939137a3b7fc5a3b7505e2521bd5ce80773de
SHA1 (patch-ac) = aefb05ebf219bcf803d92409937f48a65c0a6b0a
SHA1 (patch-ad) = a13dade7ce548ed078870db8b63548d0a91265dc
SHA1 (patch-ae) = 5cf8ad7c6e5d87856a31a5456ba9ed2422075988
SHA1 (patch-af) = f8a9f32dffa2123512e36c774ca75e0b28a053cc
SHA1 (patch-ag) = af425b9a48c17f170fc780909b7287264a053cc4
SHA1 (patch-af) = 5adc988820ed9c5a358be239b7e261e52612b39b
SHA1 (patch-ag) = 68cbfd1c48c9d447c6ed9cb0ac84f5ca6ce1a49b
SHA1 (patch-ah) = e5eb295222a007a83600d9ed17ef0a0e0fd24875
SHA1 (patch-ai) = ab8de35dad1870edb8549966aca60d0f5bdf2187
SHA1 (patch-aj) = f0ac2b33ce021f3c2757bb37e9a5749842901556

View File

@ -1,7 +1,7 @@
$NetBSD: patch-ab,v 1.3 2007/03/06 23:25:48 rillig Exp $
$NetBSD: patch-ab,v 1.4 2023/07/09 22:14:42 nia Exp $
--- unix/unix.c.orig 1994-07-22 00:37:08.000000000 +0200
+++ unix/unix.c 2007-03-07 00:08:23.142229936 +0100
--- unix/unix.c.orig 1994-07-21 22:37:08.000000000 +0000
+++ unix/unix.c
@@ -43,6 +43,11 @@ typedef struct { int stuff; } fpvmach;
#include <sys/param.h>
#endif
@ -23,19 +23,22 @@ $NetBSD: patch-ab,v 1.3 2007/03/06 23:25:48 rillig Exp $
#ifdef USG
struct passwd *getpwuid();
@@ -260,6 +265,7 @@ char *p;
@@ -260,23 +265,15 @@ char *p;
}
#endif
+#if 0
#ifdef USG
unsigned short getuid();
#else
@@ -271,12 +277,15 @@ int getuid();
#endif
#endif
#endif
+#endif
-#ifdef USG
-unsigned short getuid();
-#else
-#ifndef SECURE
-#ifdef BSD4_3
-uid_t getuid();
-#else /* other BSD versions */
-int getuid();
-#endif
-#endif
-#endif
+#include <unistd.h>
/* Find a default user name from the system. */
void user_name(buf)
@ -47,7 +50,7 @@ $NetBSD: patch-ab,v 1.3 2007/03/06 23:25:48 rillig Exp $
struct passwd *pwline;
register char *p;
@@ -314,7 +323,10 @@ char *file, *exp;
@@ -314,7 +311,10 @@ char *file, *exp;
user[i] = '\0';
if (i == 0)
{
@ -59,7 +62,7 @@ $NetBSD: patch-ab,v 1.3 2007/03/06 23:25:48 rillig Exp $
if (login != NULL)
(void) strcpy (user, login);
@@ -342,7 +354,6 @@ char *file;
@@ -342,7 +342,6 @@ char *file;
char *mode;
{
char buf[1024];
@ -67,7 +70,7 @@ $NetBSD: patch-ab,v 1.3 2007/03/06 23:25:48 rillig Exp $
if (tilde(file, buf))
return (fopen(buf, mode));
@@ -357,7 +368,6 @@ char *file;
@@ -357,7 +356,6 @@ char *file;
int flags, mode;
{
char buf[1024];

View File

@ -1,7 +1,32 @@
$NetBSD: patch-af,v 1.1 1999/08/30 02:35:10 simonb Exp $
--- source/death.c.orig Fri Jul 22 11:47:16 1994
+++ source/death.c Sun Aug 29 09:28:44 1999
@@ -126,7 +126,7 @@
$NetBSD: patch-af,v 1.2 2023/07/09 22:14:42 nia Exp $
--- source/death.c.orig 1994-07-22 01:47:16.000000000 +0000
+++ source/death.c
@@ -50,23 +50,7 @@
#endif
#endif
-#ifdef VMS
-unsigned int getuid(), getgid();
-#else
-#ifdef unix
-#ifdef USG
-unsigned short getuid(), getgid();
-#else
-#ifndef SECURE
-#ifdef BSD4_3
-uid_t getuid(), getgid();
-#else /* other BSD versions */
-int getuid(), getgid();
-#endif
-#endif
-#endif
-#endif
-#endif
+#include <unistd.h>
#ifdef USG
#ifndef ATARIST_MWC
@@ -126,7 +110,7 @@ static void kingly(void);
#ifndef VMS
#ifndef MAC
#if !defined(ATARIST_MWC) && !defined(AMIGA)
@ -10,7 +35,7 @@ $NetBSD: patch-af,v 1.1 1999/08/30 02:35:10 simonb Exp $
#endif
#endif
#endif
@@ -144,9 +144,9 @@
@@ -144,9 +128,9 @@ char *day;
#ifdef MAC
clockvar = time((time_t *) 0);
#else

View File

@ -1,6 +1,6 @@
$NetBSD: patch-ag,v 1.1 1999/08/30 02:35:10 simonb Exp $
--- source/main.c.orig Fri Jul 22 11:47:27 1994
+++ source/main.c Sun Aug 29 09:25:32 1999
$NetBSD: patch-ag,v 1.2 2023/07/09 22:14:42 nia Exp $
--- source/main.c.orig 1994-07-22 01:47:27.000000000 +0000
+++ source/main.c
@@ -92,7 +92,7 @@
#ifndef MAC
#ifndef GEMDOS
@ -10,7 +10,24 @@ $NetBSD: patch-ag,v 1.1 1999/08/30 02:35:10 simonb Exp $
#endif
#endif
char *getenv();
@@ -363,7 +363,7 @@
@@ -103,14 +103,12 @@ char *getenv();
#ifndef AMIGA
#ifdef USG
#if !defined(MSDOS) && !defined(ATARIST_TC)
-unsigned short getuid(), getgid();
+#include <unistd.h>
#endif
#else
#ifndef SECURE
#ifdef BSD4_3
-uid_t getuid(), getgid();
-#else /* other BSD versions */
-int getuid(), getgid();
+#include <unistd.h>
#endif
#endif
#endif
@@ -363,7 +361,7 @@ char *argv[];
#ifdef MAC
birth_date = time ((time_t *)0);
#else