forked from aniani/vim
patch 8.2.2247: VMS: various smaller problems
Problem: VMS: various smaller problems. Solution: Fix VMS building and other problems. (Zoltan Arpadffy)
This commit is contained in:
parent
4d8c96d466
commit
467676d468
@ -2,7 +2,7 @@
|
|||||||
# Makefile for Vim on OpenVMS
|
# Makefile for Vim on OpenVMS
|
||||||
#
|
#
|
||||||
# Maintainer: Zoltan Arpadffy <arpadffy@polarhome.com>
|
# 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
|
# This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
|
||||||
# with MMS and MMK
|
# with MMS and MMK
|
||||||
@ -49,7 +49,7 @@ GUI = YES
|
|||||||
|
|
||||||
# GUI/Motif with XPM
|
# GUI/Motif with XPM
|
||||||
# If you have XPM installed you might want to build Motif version with toolbar
|
# 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.
|
# Comment out if you want the compiler version with :ver command.
|
||||||
# NOTE: This part can make some complications if you're using some
|
# NOTE: This part can make some complications if you're using some
|
||||||
@ -97,7 +97,7 @@ CCVER = YES
|
|||||||
.IFDEF MMSVAX
|
.IFDEF MMSVAX
|
||||||
.IFDEF DECC # VAX with DECC
|
.IFDEF DECC # VAX with DECC
|
||||||
CC_DEF = cc # /decc # some versions require /decc switch but when it is not required /ver might fail
|
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
|
OPTIMIZE= /noopt # do not optimize on VAX. The compiler has hard time with crypto functions
|
||||||
.ELSE # VAX with VAXC
|
.ELSE # VAX with VAXC
|
||||||
CC_DEF = cc
|
CC_DEF = cc
|
||||||
@ -107,7 +107,7 @@ CCVER =
|
|||||||
.ENDIF
|
.ENDIF
|
||||||
.ELSE # AXP and IA64 with DECC
|
.ELSE # AXP and IA64 with DECC
|
||||||
CC_DEF = cc
|
CC_DEF = cc
|
||||||
PREFIX = /prefix=all
|
PREFIX = /prefix=all/name=(upper,short)
|
||||||
OPTIMIZE= /opt
|
OPTIMIZE= /opt
|
||||||
.ENDIF
|
.ENDIF
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ GTK = ""
|
|||||||
GTK_DIR = DKA0:[WORK.GTK1210.]
|
GTK_DIR = DKA0:[WORK.GTK1210.]
|
||||||
DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
|
DEFS = "HAVE_CONFIG_H","FEAT_GUI_GTK"
|
||||||
LIBS = ,OS_VMS_GTK.OPT/OPT
|
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_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_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"
|
GUI_INC = ,"/gtk_root/gtk","/gtk_root/glib"
|
||||||
@ -177,6 +177,7 @@ MOTIF = YES
|
|||||||
.IFDEF XPM
|
.IFDEF XPM
|
||||||
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF","HAVE_XPM"
|
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF","HAVE_XPM"
|
||||||
XPM_INC = ,[.xpm.include]
|
XPM_INC = ,[.xpm.include]
|
||||||
|
XPM_LIB = ,OS_VMS_XPM.OPT/OPT
|
||||||
.ELSE
|
.ELSE
|
||||||
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
|
DEFS = "HAVE_CONFIG_H","FEAT_GUI_MOTIF"
|
||||||
XPM_INC =
|
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) -
|
/include=($(C_INC)$(GUI_INC_DIR)$(GUI_INC_VER)$(PERL_INC)$(PYTHON_INC) -
|
||||||
$(TCL_INC)$(XDIFF_INC)$(XPM_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)
|
$(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
|
||||||
|
|
||||||
SRC = \
|
SRC = \
|
||||||
@ -546,6 +547,7 @@ clean :
|
|||||||
-@ if "''F$SEARCH("pathdef.c")'" .NES. "" then delete/noconfirm/nolog pathdef.c;*
|
-@ 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("if_perl.c")'" .NES. "" then delete/noconfirm/nolog if_perl.c;*
|
||||||
-@ if "''F$SEARCH("*.opt")'" .NES. "" then delete/noconfirm/nolog *.opt;*
|
-@ if "''F$SEARCH("*.opt")'" .NES. "" then delete/noconfirm/nolog *.opt;*
|
||||||
|
-@ if "''F$SEARCH("*.dmp")'" .NES. "" then delete/noconfirm/nolog *.dmp;*
|
||||||
|
|
||||||
# Link the target
|
# Link the target
|
||||||
$(TARGET) : $(OBJ)
|
$(TARGET) : $(OBJ)
|
||||||
@ -599,6 +601,18 @@ check_ccver :
|
|||||||
motif_env :
|
motif_env :
|
||||||
.IFDEF XPM
|
.IFDEF XPM
|
||||||
-@ write sys$output "using DECW/Motif/XPM environment."
|
-@ 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
|
.ELSE
|
||||||
-@ write sys$output "using DECW/Motif environment."
|
-@ write sys$output "using DECW/Motif environment."
|
||||||
.ENDIF
|
.ENDIF
|
||||||
|
@ -24,7 +24,8 @@
|
|||||||
# ifdef MIN
|
# ifdef MIN
|
||||||
# undef MIN
|
# undef MIN
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# include "gui_gtk_vms.h"
|
||||||
|
# endif // VMS
|
||||||
# include <X11/Intrinsic.h>
|
# include <X11/Intrinsic.h>
|
||||||
# include <gtk/gtk.h>
|
# include <gtk/gtk.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -435,6 +435,7 @@ extern void XTFREE(char*);
|
|||||||
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
|
#define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
|
||||||
#define XmRepTypeGetId XMREPTYPEGETID
|
#define XmRepTypeGetId XMREPTYPEGETID
|
||||||
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
|
#define XmRepTypeGetRecord XMREPTYPEGETRECORD
|
||||||
|
#define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
|
||||||
#define XmRepTypeRegister XMREPTYPEREGISTER
|
#define XmRepTypeRegister XMREPTYPEREGISTER
|
||||||
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
|
#define XmRepTypeValidValue XMREPTYPEVALIDVALUE
|
||||||
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
|
#define XmScrollBarSetValues XMSCROLLBARSETVALUES
|
||||||
@ -722,17 +723,6 @@ extern void XTFREE(char*);
|
|||||||
// R5 or earlier
|
// R5 or earlier
|
||||||
#define _XtRegisterWindow _XTREGISTERWINDOW
|
#define _XtRegisterWindow _XTREGISTERWINDOW
|
||||||
#define _XtUnregisterWindow _XTUNREGISTERWINDOW
|
#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
|
#else
|
||||||
// R6 or later
|
// R6 or later
|
||||||
#define XtRegisterDrawable XTREGISTERDRAWABLE
|
#define XtRegisterDrawable XTREGISTERDRAWABLE
|
||||||
|
@ -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).
|
* normal font (current_fontset == NULL, use gui.text_gc and gui.back_gc).
|
||||||
*/
|
*/
|
||||||
static XFontSet current_fontset = NULL;
|
static XFontSet current_fontset = NULL;
|
||||||
|
# if !defined(XDrawString)
|
||||||
#define XDrawString(dpy, win, gc, x, y, str, n) \
|
# define XDrawString(dpy, win, gc, x, y, str, n) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (current_fontset != NULL) \
|
if (current_fontset != NULL) \
|
||||||
@ -104,8 +104,9 @@ static XFontSet current_fontset = NULL;
|
|||||||
else \
|
else \
|
||||||
XDrawString(dpy, win, gc, x, y, str, n); \
|
XDrawString(dpy, win, gc, x, y, str, n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
# endif
|
||||||
#define XDrawString16(dpy, win, gc, x, y, str, n) \
|
# if !defined(XDrawString16)
|
||||||
|
# define XDrawString16(dpy, win, gc, x, y, str, n) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (current_fontset != NULL) \
|
if (current_fontset != NULL) \
|
||||||
@ -113,8 +114,9 @@ static XFontSet current_fontset = NULL;
|
|||||||
else \
|
else \
|
||||||
XDrawString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
|
XDrawString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
# endif
|
||||||
#define XDrawImageString16(dpy, win, gc, x, y, str, n) \
|
# if !defined(XDrawImageString16)
|
||||||
|
# define XDrawImageString16(dpy, win, gc, x, y, str, n) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
if (current_fontset != NULL) \
|
if (current_fontset != NULL) \
|
||||||
@ -122,7 +124,7 @@ static XFontSet current_fontset = NULL;
|
|||||||
else \
|
else \
|
||||||
XDrawImageString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
|
XDrawImageString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
# endif
|
||||||
static int check_fontset_sanity(XFontSet fs);
|
static int check_fontset_sanity(XFontSet fs);
|
||||||
static int fontset_width(XFontSet fs);
|
static int fontset_width(XFontSet fs);
|
||||||
static int fontset_ascent(XFontSet fs);
|
static int fontset_ascent(XFontSet fs);
|
||||||
|
@ -158,8 +158,8 @@
|
|||||||
# define mch_access(n, p) access(vms_fixfilename(n), (p))
|
# define mch_access(n, p) access(vms_fixfilename(n), (p))
|
||||||
// see mch_open() comment
|
// see mch_open() comment
|
||||||
# define mch_fopen(n, p) fopen(vms_fixfilename(n), (p))
|
# define mch_fopen(n, p) fopen(vms_fixfilename(n), (p))
|
||||||
# define mch_fstat(n, p) fstat(vms_fixfilename(n), (p))
|
# define mch_fstat(n, p) fstat((n), (p))
|
||||||
// VMS does not have lstat()
|
# undef HAVE_LSTAT // VMS does not have lstat()
|
||||||
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
|
# define mch_stat(n, p) stat(vms_fixfilename(n), (p))
|
||||||
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
|
# define mch_rmdir(n) rmdir(vms_fixfilename(n))
|
||||||
#else
|
#else
|
||||||
|
@ -199,10 +199,11 @@
|
|||||||
# include <libdef.h>
|
# include <libdef.h>
|
||||||
# include <libdtdef.h>
|
# include <libdtdef.h>
|
||||||
|
|
||||||
# ifdef FEAT_GUI_GTK
|
# if defined(FEAT_GUI_MOTIF)
|
||||||
# include "gui_gtk_vms.h"
|
# define XFree XFREE
|
||||||
|
# define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif // VMS
|
||||||
|
|
||||||
#ifdef HAVE_FLOCK
|
#ifdef HAVE_FLOCK
|
||||||
# include <sys/file.h>
|
# include <sys/file.h>
|
||||||
|
@ -146,6 +146,8 @@
|
|||||||
#undef HAVE_SYS_POLL_H
|
#undef HAVE_SYS_POLL_H
|
||||||
#undef HAVE_FCHDIR
|
#undef HAVE_FCHDIR
|
||||||
#undef HAVE_LSTAT
|
#undef HAVE_LSTAT
|
||||||
|
#undef HAVE_STDINT_H
|
||||||
|
#undef HAVE_XOS_R_H
|
||||||
|
|
||||||
// Hardware specific
|
// Hardware specific
|
||||||
#ifdef VAX
|
#ifdef VAX
|
||||||
@ -157,6 +159,10 @@
|
|||||||
#undef HAVE_ISNAN
|
#undef HAVE_ISNAN
|
||||||
#define HAVE_NO_LONG_LONG
|
#define HAVE_NO_LONG_LONG
|
||||||
#define VIM_SIZEOF_LONG 4
|
#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
|
#else // AXP and IA64
|
||||||
#define HAVE_GETTIMEOFDAY
|
#define HAVE_GETTIMEOFDAY
|
||||||
#define HAVE_USLEEP
|
#define HAVE_USLEEP
|
||||||
@ -164,7 +170,12 @@
|
|||||||
#define HAVE_STRINGS_H
|
#define HAVE_STRINGS_H
|
||||||
#define HAVE_SIGSETJMP
|
#define HAVE_SIGSETJMP
|
||||||
#define HAVE_ISNAN
|
#define HAVE_ISNAN
|
||||||
|
#define HAVE_NO_LONG_LONG
|
||||||
#define VIM_SIZEOF_LONG 8
|
#define VIM_SIZEOF_LONG 8
|
||||||
|
#define LONG_LONG_MIN (-9223372036854775807-1)
|
||||||
|
#define LONG_LONG_MAX (9223372036854775807)
|
||||||
|
#define ULONG_LONG_MAX (18446744073709551615U)
|
||||||
|
#define XTHREADS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Compiler specific
|
// Compiler specific
|
||||||
@ -177,7 +188,7 @@
|
|||||||
#define BROKEN_LOCALE
|
#define BROKEN_LOCALE
|
||||||
#undef DYNAMIC_ICONV
|
#undef DYNAMIC_ICONV
|
||||||
#undef HAVE_STRFTIME
|
#undef HAVE_STRFTIME
|
||||||
#else
|
#else // DECC
|
||||||
#define HAVE_SELECT
|
#define HAVE_SELECT
|
||||||
#define HAVE_FCNTL_H
|
#define HAVE_FCNTL_H
|
||||||
#define HAVE_UNISTD_H 1
|
#define HAVE_UNISTD_H 1
|
||||||
@ -198,7 +209,10 @@
|
|||||||
|
|
||||||
// GUI support defines
|
// GUI support defines
|
||||||
#if defined(FEAT_GUI_MOTIF) || defined(FEAT_GUI_GTK)
|
#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 HAVE_X11
|
||||||
|
#define WANT_X11
|
||||||
#ifdef HAVE_XPM
|
#ifdef HAVE_XPM
|
||||||
#define HAVE_X11_XPM_H
|
#define HAVE_X11_XPM_H
|
||||||
#endif
|
#endif
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
* argument for tputs().
|
* argument for tputs().
|
||||||
*/
|
*/
|
||||||
# ifdef VMS
|
# ifdef VMS
|
||||||
# define TPUTSFUNCAST
|
# define TPUTSFUNCAST (void (*)(unsigned int))
|
||||||
# else
|
# else
|
||||||
# ifdef HAVE_OUTFUNTYPE
|
# ifdef HAVE_OUTFUNTYPE
|
||||||
# define TPUTSFUNCAST (outfuntype)
|
# define TPUTSFUNCAST (outfuntype)
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2247,
|
||||||
/**/
|
/**/
|
||||||
2246,
|
2246,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user