NetBSD Problem Report #7959
Received: (qmail 5405 invoked from network); 11 Jul 1999 13:03:10 -0000
Message-Id: <199907111256.OAA08972@labitzke.isdn.cs.tu-berlin.de>
Date: Sun, 11 Jul 1999 14:56:36 +0200 (CEST)
From: Bjoern Labitzke <hermit@labitzke.isdn.cs.tu-berlin.de>
Reply-To: hermit@cs.tu-berlin.de
To: gnats-bugs@gnats.netbsd.org
Subject: postgresql-patching fails
X-Send-Pr-Version: 3.95
>Number: 7959
>Category: pkg
>Synopsis: postgresql patching fails
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jul 11 06:05:00 +0000 1999
>Closed-Date: Tue Jul 13 17:50:34 +0000 1999
>Last-Modified: Tue Jul 13 17:51:23 +0000 1999
>Originator: Bjoern Labitzke
>Release: -current and pkgsrc from 10.7.1999 <NetBSD-current source date>
>Organization:
Bjoern Labitzke <hermit@cs.tu-berlin.de>
Use PGP! (Don't you use envelopes for your letters?)
>Environment:
System: NetBSD labitzke.isdn.cs.tu-berlin.de 1.4F NetBSD 1.4F (LABITZKE) #93: Sun Jul 11 03:26:57 CEST 1999 root@labitzke.isdn.cs.tu-berlin.de:/usr/src/sys/arch/i386/compile/LABITZKE i386
>Description:
The patch patch-af fails to apply, because there it seems to be made against
differing sources than the original ones. There is the powerpc mentioned in the
patch, but there is no powerpc in the original file. (include/port/bsd.h)
/usr/pkgsrc/databases/postgresql: more work/postgresql-6.4.2/src/include/port/bsd.h.rej
***************
*** 24,29 ****
#define HAS_TEST_AND_SET
#endif
#if defined(__powerpc__)
#define HAS_TEST_AND_SET
typedef unsigned int slock_t;
--- 24,33 ----
#define HAS_TEST_AND_SET
#endif
+ #if defined(__arm32__)
+ #define HAS_TEST_AND_SET
+ #endif
+
#if defined(__powerpc__)
#define HAS_TEST_AND_SET
typedef unsigned int slock_t;
>How-To-Repeat:
cd /usr/pkgsrc/databases/postgresql
make
>Fix:
I deleted the part that patched bsd.h from patch-af and created a patch-ag,
which includes the arm32-change from the original patch plus the lines I
saw for the powerpc. I don't know if they would work this way, so someone
knowledgable should check this. Here are the changed patches:
patch-af:
$NetBSD: patch-af,v 1.4 1999/05/18 15:52:19 bad Exp $
*** include/storage/s_lock.h Sat Apr 10 19:43:01 1999
--- include/storage/s_lock.h Wed Apr 7 03:06:53 1999
***************
*** 124,129 ****
--- 124,145 ----
+ #if defined(__arm32__)
+ #define TAS(lock) tas(lock)
+
+ static __inline__ int
+ tas(volatile slock_t *lock)
+ {
+ register slock_t _res = 1;
+
+ __asm__("swpb %0, %0, [%3]": "=r"(_res), "=m"(*lock):"0"(_res), "r" (lock));
+ return (int) _res;
+ }
+
+ #endif /* __arm32__ */
+
+
+
#if defined(sparc)
#define TAS(lock) tas(lock)
patch-ag:
--- include/port/bsd.h.orig Sun Jul 19 03:19:53 1998
+++ include/port/bsd.h Sun Jul 11 14:39:21 1999
@@ -28,3 +28,11 @@
/* # undef HAS_TEST_AND_SET */
#endif
typedef unsigned char slock_t;
+
+#if defined(__arm32__)
+#define HAS_TEST_AND_SET
+#endif
+
+#if defined(__powerpc__)
+#define HAS_TEST_AND_SET
+typedef unsigned int slock_t;
+#endif
>Release-Note:
>Audit-Trail:
From: Bjoern Labitzke <hermit@labitzke.isdn.cs.tu-berlin.de>
To: netbsd-bugs@netbsd.org, gnats-bugs@gnats.netbsd.org
Cc: Subject: Re: pkg/7959: postgresql-patching fails
Date: Sun, 11 Jul 1999 17:43:31 +0200
Sorry, after creating the diff I found I left out a line. I just added it
to the diff and missed, that the new line is ignored as long as the header
of the diff doesn't change. I guess I learned not to edit diffs by hand if
possible. Here is the correct version. In addition to that postgresql
didn't find tcl.h anymore. I changed the Makefile to include the correct
directories (I hope :-) ).
patch-ag:
--- include/port/bsd.h.orig Sun Jul 19 03:19:53 1998
+++ include/port/bsd.h Sun Jul 11 14:39:21 1999
@@ -28,3 +28,12 @@
/* # undef HAS_TEST_AND_SET */
#endif
typedef unsigned char slock_t;
+
+#if defined(__arm32__)
+#define HAS_TEST_AND_SET
+#endif
+
+#if defined(__powerpc__)
+#define HAS_TEST_AND_SET
+typedef unsigned int slock_t;
+#endif
================================================
--- Makefile.orig Sun Jul 11 16:54:24 1999
+++ Makefile Sun Jul 11 17:39:20 1999
@@ -32,11 +32,10 @@
CONFIGURE_ARGS= --prefix=${PREFIX}/${PGUSER} \
--enable-locale \
--with-tcl \
- --with-tclconfig="${PREFIX}/lib/tcl8.0 ${PREFIX}/lib/tk8.0" \
- --with-includes=${PREFIX}/include \
- --with-libs=${PREFIX}/lib \
+ --with-tclconfig="${LOCALBASE}/lib/tcl8.0 ${LOCALBASE}/lib/tk8.0" \
+ --with-includes="${PREFIX}/include ${LOCALBASE}/include/tcl8.0 ${LOCALBASE}/include/tk8.0" \
+ --with-libs=${LOCALBASE}/lib \
--with-template=`${ECHO} ${OPSYS} | ${TR} '[A-Z]' '[a-z]'`
-CPPFLAGS+= -I${LOCALBASE}/include/tcl8.0 -I${LOCALBASE}/include/tk8.0
INSTALL_TARGET= install install-man
--
Bjoern Labitzke <hermit@cs.tu-berlin.de>
Use PGP! (Don't you use envelopes for your letters?)
State-Changed-From-To: open->feedback
State-Changed-By: bad
State-Changed-When: Sun Jul 11 13:02:49 PDT 1999
State-Changed-Why:
I've fixed the problem as suggested bit with a slightly differnent and
correct patch.
State-Changed-From-To: feedback->closed
State-Changed-By: bad
State-Changed-When: Tue Jul 13 10:50:34 PDT 1999
State-Changed-Why:
I also applied the patch to the pkg Makefile and verified that the
pkg builds.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.