summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Hudson <Jonathan.Hudson@jrhudson.demon.co.uk>1997-05-01 14:20:23 +1200
committerChip Salzenberg <chip@atlantic.net>1997-05-16 10:15:00 +1200
commitd27fe803587dd19cb1812b267492c364c09580fa (patch)
tree46e9d12720dc8363adff79d093b8ba9c28e3d279
parent08a33705b59993dadda44188f87779b8404429f4 (diff)
downloadperl-d27fe803587dd19cb1812b267492c364c09580fa.tar.gz
VMS update, including socket support (four patches)
Signed-off-by: Peter Prymmer <pvhp@forte.com> Signed-off-by: Dan Sugalski <sugalsd@lbcc.cc.or.us>
-rw-r--r--vms/config.vms10
-rw-r--r--vms/descrip.mms2
-rw-r--r--vms/sockadapt.h3
-rw-r--r--vms/vms.c16
-rw-r--r--vms/vmsish.h8
5 files changed, 32 insertions, 7 deletions
diff --git a/vms/config.vms b/vms/config.vms
index 1d6d131a7e..cba33616d7 100644
--- a/vms/config.vms
+++ b/vms/config.vms
@@ -8,7 +8,7 @@
* GenConfig.pl when producing Config.pm.
*
* config.h for VMS
- * Version: 5.003_08
+ * Version: 5.004
*/
/* Configuration time: 19-Nov-1996 23:34
@@ -76,7 +76,7 @@
* when Perl is built. Please do not change it by hand; make
* any changes to FndVers.Com instead.
*/
-#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_00399" /**/
+#define ARCHLIB_EXP "/perl_root/lib/VMS_VAX/5_004" /**/
#define ARCHLIB ARCHLIB_EXP /*config-skip*/
/* ARCHNAME:
@@ -962,7 +962,11 @@
* is defined, and 'int *' otherwise. This is only useful if you
* have select(), of course.
*/
-#define Select_fd_set_t int * /**/
+#if defined(__DECC) && defined(__DECC_VER) && (__DECC_VER >= 50200000)
+#define Select_fd_set_t fd_set * /* config-skip */
+#else
+#define Select_fd_set_t int * /**/
+#endif
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
diff --git a/vms/descrip.mms b/vms/descrip.mms
index 29ee690d9b..15a297b838 100644
--- a/vms/descrip.mms
+++ b/vms/descrip.mms
@@ -65,7 +65,7 @@ OBJVAL = $(MMS$TARGET_NAME)$(O)
.endif
# Updated by fndvers.com -- do not edit by hand
-PERL_VERSION = 5_00399#
+PERL_VERSION = 5_004 #
ARCHDIR = [.lib.$(ARCH).$(PERL_VERSION)]
diff --git a/vms/sockadapt.h b/vms/sockadapt.h
index d7f7cdc376..f24faea475 100644
--- a/vms/sockadapt.h
+++ b/vms/sockadapt.h
@@ -32,6 +32,9 @@
void endprotoent(void);
void setservent(int);
void endservent(void);
+# if defined(__DECC) && defined(__DECC_VER) && (__DECC_VER >= 50200000)
+# define Sock_size_t unsigned int
+# endif
#else
/* Pull in SOCKETSHR's header, and set up structures for
diff --git a/vms/vms.c b/vms/vms.c
index 2fd6fc5afa..6ff11103e7 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -2880,6 +2880,22 @@ my_fwrite(void *src, size_t itmsz, size_t nitm, FILE *dest)
} /* end of my_fwrite() */
/*}}}*/
+/*{{{ int my_flush(FILE *fp)*/
+int
+my_flush(FILE *fp)
+{
+ int res;
+ if ((res = fflush(fp)) == 0) {
+#ifdef VMS_DO_SOCKETS
+ struct mystat s;
+ if (Fstat(fileno(fp), &s) == 0 && !S_ISSOCK(s.st_mode))
+#endif
+ res = fsync(fileno(fp));
+ }
+ return res;
+}
+/*}}}*/
+
/*
* Here are replacements for the following Unix routines in the VMS environment:
* getpwuid Get information for a particular UIC or UID
diff --git a/vms/vmsish.h b/vms/vmsish.h
index 9917232234..841b11993a 100644
--- a/vms/vmsish.h
+++ b/vms/vmsish.h
@@ -125,6 +125,7 @@
# define do_aspawn Perl_do_aspawn
# define do_spawn Perl_do_spawn
# define my_fwrite Perl_my_fwrite
+# define my_flush Perl_my_flush
# define my_binmode Perl_my_binmode
# define my_getpwnam Perl_my_getpwnam
# define my_getpwuid Perl_my_getpwuid
@@ -284,6 +285,9 @@
*/
#define fwrite1 my_fwrite
+/* By default, flush data all the way to disk, not just to RMS buffers */
+#define Fflush(fp) my_flush(fp)
+
/* Use our own rmdir() */
#define rmdir(name) do_rmdir(name)
@@ -357,9 +361,6 @@ struct utimbuf {
#define Stat(name,bufptr) flex_stat(name,bufptr)
#define Fstat(fd,bufptr) flex_fstat(fd,bufptr)
-/* By default, flush data all the way to disk, not just to RMS buffers */
-#define Fflush(fp) ((fflush(fp) || fsync(fileno(fp))) ? EOF : 0)
-
/* Setup for the dirent routines:
* opendir(), closedir(), readdir(), seekdir(), telldir(), and
* vmsreaddirversions(), and preprocessor stuff on which these depend:
@@ -546,6 +547,7 @@ bool vms_do_exec _((char *));
unsigned long int do_aspawn _((SV *, SV **, SV **));
unsigned long int do_spawn _((char *));
int my_fwrite _((void *, size_t, size_t, FILE *));
+int my_flush _((FILE *));
FILE * my_binmode _((FILE *, char));
struct passwd * my_getpwnam _((char *name));
struct passwd * my_getpwuid _((Uid_t uid));