summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-30 13:14:45 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-30 13:14:45 +0100
commit467676d468cb10db78d79d5bd2139ded9f70d26f (patch)
tree6774f48d11ae06b628bbaee4f029114392172fea /src
parent4d8c96d4668ac965d4e84b9676fba6d7efe62a32 (diff)
patch 8.2.2247: VMS: various smaller problemsv8.2.2247
Problem: VMS: various smaller problems. Solution: Fix VMS building and other problems. (Zoltan Arpadffy)
Diffstat (limited to 'src')
-rw-r--r--src/Make_vms.mms26
-rw-r--r--src/gui.h3
-rw-r--r--src/gui_gtk_vms.h12
-rw-r--r--src/gui_x11.c16
-rw-r--r--src/macros.h4
-rw-r--r--src/os_unix.h7
-rw-r--r--src/os_vms_conf.h16
-rw-r--r--src/term.c2
-rw-r--r--src/version.c2
9 files changed, 56 insertions, 32 deletions
diff --git a/src/Make_vms.mms b/src/Make_vms.mms
index 4b171f7903..70a87cfe2b 100644
--- a/src/Make_vms.mms
+++ b/src/Make_vms.mms
@@ -2,7 +2,7 @@
# Makefile for Vim on OpenVMS
#
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
-# Last change: 2020 Aug 13
+# Last change: 2020 Dec 30
#
# This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
# with MMS and MMK
@@ -49,7 +49,7 @@ GUI = YES
# GUI/Motif with XPM
# If you have XPM installed you might want to build Motif version with toolbar
-# XPM = YES
+XPM = YES
# Comment out if you want the compiler version with :ver command.
# NOTE: This part can make some complications if you're using some
@@ -97,7 +97,7 @@ CCVER = YES
.IFDEF MMSVAX
.IFDEF DECC # VAX with DECC
CC_DEF = cc # /decc # some versions require /decc switch but when it is not required /ver might fail
-PREFIX = /prefix=all
+PREFIX = /prefix=all/name=(upper,short)
OPTIMIZE= /noopt # do not optimize on VAX. The compiler has hard time with crypto functions
.ELSE # VAX with VAXC
CC_DEF = cc
@@ -107,7 +107,7 @@ CCVER =
.ENDIF
.ELSE # AXP and IA64 with DECC
CC_DEF = cc
-PREFIX = /prefix=all
+PREFIX = /prefix=all/name=(upper,short)
OPTIMIZE= /opt
.ENDIF
@@ -165,7 +165,7 @@ GTK = ""
GTK_DIR = DKA0:[WORK.GTK1210.]
DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
LIBS = ,OS_VMS_GTK.OPT/OPT
-GUI_FLAG = /name=(as_is,short)/float=ieee/ieee=denorm
+GUI_FLAG = /float=ieee/ieee=denorm
GUI_SRC = gui.c gui_gtk.c gui_gtk_f.c gui_gtk_x11.c gui_beval.c pty.c
GUI_OBJ = gui.obj gui_gtk.obj gui_gtk_f.obj gui_gtk_x11.obj gui_beval.obj pty.obj
GUI_INC = ,"/gtk_root/gtk","/gtk_root/glib"
@@ -177,6 +177,7 @@ MOTIF = YES
.IFDEF XPM
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF","HAVE_XPM"
XPM_INC = ,[.xpm.include]
+XPM_LIB = ,OS_VMS_XPM.OPT/OPT
.ELSE
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
XPM_INC =
@@ -291,7 +292,7 @@ ALL_CFLAGS_VER = /def=($(MODEL_DEF)$(DEFS)$(DEBUG_DEF)$(PERL_DEF)$(PYTHON_DEF) -
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) -
$(TCL_INC)$(XDIFF_INC)$(XPM_INC))
-ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) \
+ALL_LIBS = $(LIBS) $(GUI_LIB_DIR) $(GUI_LIB) $(XPM_LIB)\
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
SRC = \
@@ -546,6 +547,7 @@ clean :
-@ if "''F$SEARCH("pathdef.c")'" .NES. "" then delete/noconfirm/nolog pathdef.c;*
-@ if "''F$SEARCH("if_perl.c")'" .NES. "" then delete/noconfirm/nolog if_perl.c;*
-@ if "''F$SEARCH("*.opt")'" .NES. "" then delete/noconfirm/nolog *.opt;*
+ -@ if "''F$SEARCH("*.dmp")'" .NES. "" then delete/noconfirm/nolog *.dmp;*
# Link the target
$(TARGET) : $(OBJ)
@@ -599,6 +601,18 @@ check_ccver :
motif_env :
.IFDEF XPM
-@ write sys$output "using DECW/Motif/XPM environment."
+ -@ write sys$output "creating OS_VMS_XPM.OPT file."
+ -@ open/write opt_file OS_VMS_XPM.OPT
+.IFDEF MMSVAX
+ -@ write opt_file "[.xpm.vms.vax]libxpm.olb/lib"
+.ENDIF
+.IFDEF MMSALPHA
+ -@ write opt_file "[.xpm.vms.axp]libxpm.olb/lib"
+.ENDIF
+.IFDEF MMSIA64
+ -@ write opt_file "[.xpm.vms.ia64]libxpm.olb/lib"
+.ENDIF
+ -@ close opt_file
.ELSE
-@ write sys$output "using DECW/Motif environment."
.ENDIF
diff --git a/src/gui.h b/src/gui.h
index 8b8b7fb163..b7b526d0cf 100644
--- a/src/gui.h
+++ b/src/gui.h
@@ -24,7 +24,8 @@
# ifdef MIN
# undef MIN
# endif
-# endif
+# include "gui_gtk_vms.h"
+# endif // VMS
# include <X11/Intrinsic.h>
# include <gtk/gtk.h>
#endif
diff --git a/src/gui_gtk_vms.h b/src/gui_gtk_vms.h
index c86bd0a5af..d30872ed2b 100644
--- a/src/gui_gtk_vms.h
+++ b/src/gui_gtk_vms.h
@@ -435,6 +435,7 @@ extern void XTFREE(char*);
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
#define XmRepTypeGetId XMREPTYPEGETID
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
+#define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
#define XmRepTypeRegister XMREPTYPEREGISTER
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
@@ -722,17 +723,6 @@ extern void XTFREE(char*);
// R5 or earlier
#define _XtRegisterWindow _XTREGISTERWINDOW
#define _XtUnregisterWindow _XTUNREGISTERWINDOW
-// original code is fixed so we don't need this now
-#if 0
-#define XtRegisterDrawable(display,drawable,widget) \
-{ extern void _XtRegisterWindow(Window,Widget); \
- _XtRegisterWindow(drawable,widget); \
-}
-#define XtUnregisterDrawable(display,drawable) \
-{ extern void _XtUnregisterWindow(Window,Widget); \
- _XtUnregisterWindow(drawable,XtWindowToWidget(display,drawable)); \
-}
-#endif
#else
// R6 or later
#define XtRegisterDrawable XTREGISTERDRAWABLE
diff --git a/src/gui_x11.c b/src/gui_x11.c
index 38f85d875e..14a0b8085f 100644
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -95,8 +95,8 @@ static Atom wm_atoms[2]; // Window Manager Atoms
* normal font (current_fontset == NULL, use gui.text_gc and gui.back_gc).
*/
static XFontSet current_fontset = NULL;
-
-#define XDrawString(dpy, win, gc, x, y, str, n) \
+# if !defined(XDrawString)
+# define XDrawString(dpy, win, gc, x, y, str, n) \
do \
{ \
if (current_fontset != NULL) \
@@ -104,8 +104,9 @@ static XFontSet current_fontset = NULL;
else \
XDrawString(dpy, win, gc, x, y, str, n); \
} while (0)
-
-#define XDrawString16(dpy, win, gc, x, y, str, n) \
+# endif
+# if !defined(XDrawString16)
+# define XDrawString16(dpy, win, gc, x, y, str, n) \
do \
{ \
if (current_fontset != NULL) \
@@ -113,8 +114,9 @@ static XFontSet current_fontset = NULL;
else \
XDrawString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
} while (0)
-
-#define XDrawImageString16(dpy, win, gc, x, y, str, n) \
+# endif
+# if !defined(XDrawImageString16)
+# define XDrawImageString16(dpy, win, gc, x, y, str, n) \
do \
{ \
if (current_fontset != NULL) \
@@ -122,7 +124,7 @@ static XFontSet current_fontset = NULL;
else \
XDrawImageString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
} while (0)
-
+# endif
static int check_fontset_sanity(XFontSet fs);
static int fontset_width(XFontSet fs);
static int fontset_ascent(XFontSet fs);
diff --git a/src/macros.h b/src/macros.h
index 7557b26917..366413a917 100644
--- a/src/macros.h
+++ b/src/macros.h
@@ -158,8 +158,8 @@
# define mch_access(n, p) access(vms_fixfilename(n), (p))
// see mch_open() comment
# define mch_fopen(n, p) fopen(vms_fixfilename(n), (p))
-# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
- // VMS does not have lstat()
+# define mch_fstat(n, p) fstat((n), (p))
+# undef HAVE_LSTAT // VMS does not have lstat()
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
#else
diff --git a/src/os_unix.h b/src/os_unix.h
index 9b7337ac19..46f4bba012 100644
--- a/src/os_unix.h
+++ b/src/os_unix.h
@@ -199,10 +199,11 @@
# include <libdef.h>
# include <libdtdef.h>
-# ifdef FEAT_GUI_GTK
-# include "gui_gtk_vms.h"
+# if defined(FEAT_GUI_MOTIF)
+# define XFree XFREE
+# define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
# endif
-#endif
+#endif // VMS
#ifdef HAVE_FLOCK
# include <sys/file.h>
diff --git a/src/os_vms_conf.h b/src/os_vms_conf.h
index 275a2c1a2d..deb7080607 100644
--- a/src/os_vms_conf.h
+++ b/src/os_vms_conf.h
@@ -146,6 +146,8 @@
#undef HAVE_SYS_POLL_H
#undef HAVE_FCHDIR
#undef HAVE_LSTAT
+#undef HAVE_STDINT_H
+#undef HAVE_XOS_R_H
// Hardware specific
#ifdef VAX
@@ -157,6 +159,10 @@
#undef HAVE_ISNAN
#define HAVE_NO_LONG_LONG
#define VIM_SIZEOF_LONG 4
+#define LONG_LONG_MIN (-2147483647-1)
+#define LONG_LONG_MAX (2147483647)
+#define ULONG_LONG_MAX (4294967295U)
+#undef XTHREADS
#else // AXP and IA64
#define HAVE_GETTIMEOFDAY
#define HAVE_USLEEP
@@ -164,7 +170,12 @@
#define HAVE_STRINGS_H
#define HAVE_SIGSETJMP
#define HAVE_ISNAN
+#define HAVE_NO_LONG_LONG
#define VIM_SIZEOF_LONG 8
+#define LONG_LONG_MIN (-9223372036854775807-1)
+#define LONG_LONG_MAX (9223372036854775807)
+#define ULONG_LONG_MAX (18446744073709551615U)
+#define XTHREADS
#endif
// Compiler specific
@@ -177,7 +188,7 @@
#define BROKEN_LOCALE
#undef DYNAMIC_ICONV
#undef HAVE_STRFTIME
-#else
+#else // DECC
#define HAVE_SELECT
#define HAVE_FCNTL_H
#define HAVE_UNISTD_H 1
@@ -198,7 +209,10 @@
// GUI support defines
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
+#define X_INCLUDE_GRP_H // To use getgrgid
+#define XUSE_MTSAFE_API
#define HAVE_X11
+#define WANT_X11
#ifdef HAVE_XPM
#define HAVE_X11_XPM_H
#endif
diff --git a/src/term.c b/src/term.c
index b55d395770..bb4bad1c96 100644
--- a/src/term.c
+++ b/src/term.c
@@ -38,7 +38,7 @@
* argument for tputs().
*/
# ifdef VMS
-# define TPUTSFUNCAST
+# define TPUTSFUNCAST (void (*)(unsigned int))
# else
# ifdef HAVE_OUTFUNTYPE
# define TPUTSFUNCAST (outfuntype)
diff --git a/src/version.c b/src/version.c
index 3894bc0e1d..27907d721e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -751,6 +751,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2247,
+/**/
2246,
/**/
2245,