🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Rainer Orth Fri, 02 Oct 1992 03:04
gdbm 1.5 changes for Solaris 2.0/SVR4
#1000
Author: Rainer Orth
Date: Fri, 02 Oct 1992 03:04
75 lines
2571 bytes
Below I've included the few changes I had to make to gdbm 1.5 to have it
compile and pass the tests in the native SVR4 environment of Solaris 2.0,
using gcc 2.2.2 ss-920925.

===================================================================
RCS file: RCS/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- Makefile	1991/01/24 17:22:59	1.1
+++ Makefile	1992/09/30 20:38:41
@@ -7,11 +7,11 @@
 #
 # for gcc, uncomment the CC = gcc line.
 
-#CC = gcc
-CFLAGS = -g # -O -DSYSV
+CC = gcc
+CFLAGS = -g -O -DSYSV -DSVR4
 LDFLAGS =
 LIBS = # -lPW
-DBM = -ldbm
+DBM = -L/usr/ucblib -ldbm -lucb
 NDBM = -lc
 LIBC = -lc
 LINTFLAGS =
===================================================================
RCS file: RCS/systems.h,v
retrieving revision 1.1
diff -u -r1.1 systems.h
--- systems.h	1991/03/01 00:58:34	1.1
+++ systems.h	1992/09/30 20:28:21
@@ -36,6 +36,7 @@
 
 /* File seeking needs L_SET defined .*/
 #include <unistd.h>
+#undef L_SET
 #define L_SET SEEK_SET
 
 /* Some files need fcntl.h for locking. */
@@ -70,7 +71,13 @@
 #define bcmp(d1, d2, n)	memcmp(d1, d2, n)
 #define bcopy(d1, d2, n) memcpy(d2, d1, n)
 
-/* Sys V does not have fsync. */
+/* Get string definitions. */
+#include <string.h>
+#define _HAVE_STRING
+#endif
+
+#ifndef SVR4
+/* Sys V before R4 does not have fsync. */
 #define fsync(f) sync(); sync()
 
 /* Stat does not have a st_blksize field. */
@@ -79,13 +86,9 @@
 /* Does not have rename(). */
 #define NEED_RENAME
 
-/* Get string definitions. */
-#include <string.h>
-#define _HAVE_STRING
-#endif
-
-/* Sys V does not have a truncate call, how primitive. */
+/* Sys V before R4 does not have a truncate call, how primitive. */
 #define TRUNCATE(dbf) close( open (dbf->name, O_RDWR|O_TRUNC, mode));
+#endif
 
 
 /*      End of System V changes and defines.      */

-----------------------------------------------------------------------------
Rainer Orth, Technical Computer Science, University of Bielefeld

Internet: ro@TechFak.Uni-Bielefeld.DE
gdbm 1.5 changes for Solaris 2.0/SVR4
#1005
Author: Phil Nelson
Date: Mon, 05 Oct 1992 04:37
3 lines
538 bytes
Thanks, I'll take a look at the changes.
 
--Phil
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads