summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorHans Mulder <hansmu@xs4all.nl>1998-02-26 03:09:55 -0800
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1998-02-27 15:31:12 +0000
commitbf99883da2fbc1b4d546abddb96990a37466b881 (patch)
treed909f5bce1dfc4639e5a489f66e9aaba074abc7b /ext
parentc2267164204a961273c71c9c103831895724b0b1 (diff)
downloadperl-bf99883da2fbc1b4d546abddb96990a37466b881.tar.gz
[PATCH 5.004_60] Fix to MM_VMS.PM
Date: Thu, 26 Feb 1998 11:09:55 -0800 Subject: [PATCH 5.004_60] Get SDBM_File working on VMS Date: Thu, 26 Feb 1998 11:15:24 -0800 p4raw-id: //depot/perl@594
Diffstat (limited to 'ext')
-rw-r--r--ext/SDBM_File/Makefile.PL34
-rw-r--r--ext/SDBM_File/sdbm/Makefile.PL4
-rw-r--r--ext/SDBM_File/sdbm/sdbm.h20
3 files changed, 43 insertions, 15 deletions
diff --git a/ext/SDBM_File/Makefile.PL b/ext/SDBM_File/Makefile.PL
index 02dfd7d84f..c0daa064c7 100644
--- a/ext/SDBM_File/Makefile.PL
+++ b/ext/SDBM_File/Makefile.PL
@@ -6,21 +6,37 @@ use ExtUtils::MakeMaker;
# which perform the corresponding actions in the subdirectory.
$define = ($^O eq 'MSWin32') ? '-DMSDOS' : '';
+if ($^O eq 'MSWin32') {
+ $myextlib = 'sdbm\\libsdbm$(LIB_EXT)';
+} elsif ($^O eq 'VMS') {
+ $myextlib = 'sdbm/libsdbm$(LIB_EXT)';
+} else {
+ $myextlib = 'sdbm/libsdbm$(LIB_EXT)';
+}
WriteMakefile(
- NAME => 'SDBM_File',
- MYEXTLIB => 'sdbm'.($^O eq 'MSWin32' ? '\\' : '/').'libsdbm$(LIB_EXT)',
- MAN3PODS => ' ', # Pods will be built by installman.
- XSPROTOARG => '-noprototypes', # XXX remove later?
- VERSION_FROM => 'SDBM_File.pm',
- DEFINE => $define,
-);
-
+ NAME => 'SDBM_File',
+ MYEXTLIB => $myextlib,
+ MAN3PODS => ' ', # Pods will be built by installman.
+ XSPROTOARG => '-noprototypes', # XXX remove later?
+ VERSION_FROM => 'SDBM_File.pm',
+ DEFINE => $define,
+# NORECURS => $^O eq 'VMS',
+# SKIP => $^O eq 'VMS' ? 'subdirs' : '', # Don't do the subdirs section for VMS
+ );
sub MY::postamble {
+ if ($^O ne 'VMS') {
'
$(MYEXTLIB): sdbm/Makefile
cd sdbm && $(MAKE) all
';
+ } else {
+ '
+$(MYEXTLIB): [.sdbm]descrip.mms
+ set def [.sdbm]
+ $(MMS) all
+ set def [-]
+';
+ }
}
-
diff --git a/ext/SDBM_File/sdbm/Makefile.PL b/ext/SDBM_File/sdbm/Makefile.PL
index 50fd83eb25..e9d4dcd0fa 100644
--- a/ext/SDBM_File/sdbm/Makefile.PL
+++ b/ext/SDBM_File/sdbm/Makefile.PL
@@ -5,11 +5,11 @@ $define .= ' -DWIN32' if ($^O eq 'MSWin32');
WriteMakefile(
NAME => 'sdbm', # (doesn't matter what the name is here) oh yes it does
- LINKTYPE => 'static',
+# LINKTYPE => 'static',
DEFINE => $define,
INC => '-I$(PERL_INC)', # force PERL_INC dir ahead of system -I's
SKIP => [qw(dynamic dynamic_lib)],
- OBJECT => '$(O_FILES)',
+ OBJECT => ($^O eq 'VMS') ? 'sdbm.obj pair.obj hash.obj' : '$(O_FILES)',
clean => {'FILES' => 'dbu libsdbm.a dbd dba dbe x-dbu *.dir *.pag'},
H => [qw(tune.h sdbm.h pair.h $(PERL_INC)/config.h)],
C => [qw(sdbm.c pair.c hash.c)]
diff --git a/ext/SDBM_File/sdbm/sdbm.h b/ext/SDBM_File/sdbm/sdbm.h
index ac2dc36b01..b3ed2d4b8b 100644
--- a/ext/SDBM_File/sdbm/sdbm.h
+++ b/ext/SDBM_File/sdbm/sdbm.h
@@ -9,7 +9,11 @@
#define PAIRMAX 1008 /* arbitrary on PBLKSIZ-N */
#define SPLTMAX 10 /* maximum allowed splits */
/* for a single insertion */
+#ifdef VMS
+#define DIRFEXT ".sdbm_dir"
+#else
#define DIRFEXT ".dir"
+#endif
#define PAGFEXT ".pag"
typedef struct {
@@ -116,11 +120,15 @@ extern long sdbm_hash proto((char *, int));
#include <ctype.h>
#include <setjmp.h>
-#ifdef I_UNISTD
+#if defined(I_UNISTD) || defined(VMS)
#include <unistd.h>
#endif
-#if !defined(MSDOS) && !defined(WIN32)
+#ifdef VMS
+# include <fcntl.h>
+#endif
+
+#if !defined(MSDOS) && !defined(WIN32) && !defined(VMS)
# ifdef PARAM_NEEDS_TYPES
# include <sys/types.h>
# endif
@@ -237,7 +245,7 @@ extern long sdbm_hash proto((char *, int));
# endif
#else
# ifndef memcmp
-# /* maybe we should have included the full embedding header... */
+ /* maybe we should have included the full embedding header... */
# ifdef NO_EMBED
# define memcmp my_memcmp
# else
@@ -264,7 +272,11 @@ extern long sdbm_hash proto((char *, int));
#endif
#ifdef I_NETINET_IN
-# include <netinet/in.h>
+# ifdef VMS
+# include <in.h>
+# else
+# include <netinet/in.h>
+# endif
#endif
#endif /* Include guard */