Patch 8.2.2247
Problem:    VMS: various smaller problems.
Solution:   Fix VMS building and other problems. (Zoltan Arpadffy)
Files:      src/term.c, src/gui_gtk_vms.h, src/os_vms_conf.h, src/gui_x11.c,
            src/Make_vms.mms, src/macros.h, src/gui.h, src/os_unix.h


*** ../vim-8.2.2246/src/term.c  2020-12-29 20:53:28.299402080 +0100
--- src/term.c  2020-12-30 12:46:18.232103919 +0100
***************
*** 38,44 ****
   * argument for tputs().
   */
  # ifdef VMS
! #  define TPUTSFUNCAST
  # else
  #  ifdef HAVE_OUTFUNTYPE
  #   define TPUTSFUNCAST (outfuntype)
--- 38,44 ----
   * argument for tputs().
   */
  # ifdef VMS
! #  define TPUTSFUNCAST (void (*)(unsigned int))
  # else
  #  ifdef HAVE_OUTFUNTYPE
  #   define TPUTSFUNCAST (outfuntype)
*** ../vim-8.2.2246/src/gui_gtk_vms.h   2019-11-30 18:24:43.000000000 +0100
--- src/gui_gtk_vms.h   2020-12-30 12:46:49.027994477 +0100
***************
*** 435,440 ****
--- 435,441 ----
  #define XmRemoveProtocolCallback XMREMOVEPROTOCOLCALLBACK
  #define XmRepTypeGetId XMREPTYPEGETID
  #define XmRepTypeGetRecord XMREPTYPEGETRECORD
+ #define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
  #define XmRepTypeRegister XMREPTYPEREGISTER
  #define XmRepTypeValidValue XMREPTYPEVALIDVALUE
  #define XmScrollBarSetValues XMSCROLLBARSETVALUES
***************
*** 722,738 ****
  // 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
--- 723,728 ----
*** ../vim-8.2.2246/src/os_vms_conf.h   2019-11-30 18:52:53.000000000 +0100
--- src/os_vms_conf.h   2020-12-30 12:47:35.483829989 +0100
***************
*** 146,151 ****
--- 146,153 ----
  #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,162 ****
--- 159,168 ----
  #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,170 ****
--- 170,181 ----
  #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,183 ****
  #define BROKEN_LOCALE
  #undef  DYNAMIC_ICONV
  #undef        HAVE_STRFTIME
! #else
  #define HAVE_SELECT
  #define HAVE_FCNTL_H
  #define HAVE_UNISTD_H 1
--- 188,194 ----
  #define BROKEN_LOCALE
  #undef  DYNAMIC_ICONV
  #undef        HAVE_STRFTIME
! #else   // DECC
  #define HAVE_SELECT
  #define HAVE_FCNTL_H
  #define HAVE_UNISTD_H 1
***************
*** 198,204 ****
--- 209,218 ----
  
  // 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
*** ../vim-8.2.2246/src/gui_x11.c       2020-10-07 16:12:33.905930345 +0200
--- src/gui_x11.c       2020-12-30 12:48:23.387661030 +0100
***************
*** 95,102 ****
   * 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) \
        do \
        { \
            if (current_fontset != NULL) \
--- 95,102 ----
   * normal font (current_fontset == NULL, use gui.text_gc and gui.back_gc).
   */
  static XFontSet current_fontset = NULL;
! # if !defined(XDrawString)
! #  define XDrawString(dpy, win, gc, x, y, str, n) \
        do \
        { \
            if (current_fontset != NULL) \
***************
*** 104,111 ****
            else \
                XDrawString(dpy, win, gc, x, y, str, n); \
        } while (0)
! 
! #define XDrawString16(dpy, win, gc, x, y, str, n) \
        do \
        { \
            if (current_fontset != NULL) \
--- 104,112 ----
            else \
                XDrawString(dpy, win, gc, x, y, str, n); \
        } while (0)
! # endif
! # if !defined(XDrawString16)
! #  define XDrawString16(dpy, win, gc, x, y, str, n) \
        do \
        { \
            if (current_fontset != NULL) \
***************
*** 113,120 ****
            else \
                XDrawString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
        } while (0)
! 
! #define XDrawImageString16(dpy, win, gc, x, y, str, n) \
        do \
        { \
            if (current_fontset != NULL) \
--- 114,122 ----
            else \
                XDrawString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
        } while (0)
! # endif
! # if !defined(XDrawImageString16)
! #  define XDrawImageString16(dpy, win, gc, x, y, str, n) \
        do \
        { \
            if (current_fontset != NULL) \
***************
*** 122,128 ****
            else \
                XDrawImageString16(dpy, win, gc, x, y, (XChar2b *)str, n); \
        } while (0)
! 
  static int check_fontset_sanity(XFontSet fs);
  static int fontset_width(XFontSet fs);
  static int fontset_ascent(XFontSet fs);
--- 124,130 ----
            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);
*** ../vim-8.2.2246/src/Make_vms.mms    2020-08-13 22:47:20.373992741 +0200
--- src/Make_vms.mms    2020-12-30 12:49:31.863420576 +0100
***************
*** 2,8 ****
  # Makefile for Vim on OpenVMS
  #
  # Maintainer:   Zoltan Arpadffy <[email protected]>
! # Last change:  2020 Aug 13
  #
  # This script has been tested on VMS 6.2 to 8.4 on DEC Alpha, VAX and IA64
  # with MMS and MMK
--- 2,8 ----
  # Makefile for Vim on OpenVMS
  #
  # Maintainer:   Zoltan Arpadffy <[email protected]>
! # 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,55 ****
  
  # GUI/Motif with XPM
  # If you have XPM installed you might want to build Motif version with toolbar
! # 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
--- 49,55 ----
  
  # GUI/Motif with XPM
  # If you have XPM installed you might want to build Motif version with toolbar
! 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,103 ****
  .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
  OPTIMIZE= /noopt     # do not optimize on VAX. The compiler has hard time 
with crypto functions
  .ELSE              # VAX with VAXC
  CC_DEF        = cc
--- 97,103 ----
  .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/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,113 ****
  .ENDIF
  .ELSE              # AXP and IA64 with DECC
  CC_DEF  = cc
! PREFIX  = /prefix=all
  OPTIMIZE= /opt
  .ENDIF
  
--- 107,113 ----
  .ENDIF
  .ELSE              # AXP and IA64 with DECC
  CC_DEF  = cc
! PREFIX  = /prefix=all/name=(upper,short)
  OPTIMIZE= /opt
  .ENDIF
  
***************
*** 165,171 ****
  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_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"
--- 165,171 ----
  GTK_DIR  = DKA0:[WORK.GTK1210.]
  DEFS     = "HAVE_CONFIG_H","FEAT_GUI_GTK"
  LIBS     = ,OS_VMS_GTK.OPT/OPT
! 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,182 ****
--- 177,183 ----
  .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,297 ****
   /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) \
           $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
  
  SRC = \
--- 292,298 ----
   /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) $(XPM_LIB)\
           $(PERL_LIB) $(PYTHON_LIB) $(TCL_LIB) $(RUBY_LIB)
  
  SRC = \
***************
*** 546,551 ****
--- 547,553 ----
        -@ 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,604 ****
--- 601,618 ----
  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
*** ../vim-8.2.2246/src/macros.h        2020-08-05 12:10:46.134836943 +0200
--- src/macros.h        2020-12-30 12:50:02.647312841 +0100
***************
*** 158,165 ****
  # 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_stat(n, p)               stat(vms_fixfilename(n), (p))
  # define mch_rmdir(n)         rmdir(vms_fixfilename(n))
  #else
--- 158,165 ----
  # 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((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
*** ../vim-8.2.2246/src/gui.h   2020-08-11 21:58:12.585968185 +0200
--- src/gui.h   2020-12-30 12:54:54.618299773 +0100
***************
*** 24,30 ****
  #  ifdef MIN
  #   undef MIN
  #  endif
! # endif
  # include <X11/Intrinsic.h>
  # include <gtk/gtk.h>
  #endif
--- 24,31 ----
  #  ifdef MIN
  #   undef MIN
  #  endif
! #  include "gui_gtk_vms.h"
! # endif // VMS
  # include <X11/Intrinsic.h>
  # include <gtk/gtk.h>
  #endif
*** ../vim-8.2.2246/src/os_unix.h       2020-05-07 18:37:00.128512594 +0200
--- src/os_unix.h       2020-12-30 12:59:04.185442778 +0100
***************
*** 199,208 ****
  # include <libdef.h>
  # include <libdtdef.h>
  
! # ifdef FEAT_GUI_GTK
! #  include "gui_gtk_vms.h"
  # endif
! #endif
  
  #ifdef HAVE_FLOCK
  # include <sys/file.h>
--- 199,209 ----
  # include <libdef.h>
  # include <libdtdef.h>
  
! # if defined(FEAT_GUI_MOTIF)
! #  define XFree XFREE
! #  define XmRepTypeInstallTearOffModelCon XMREPTYPEINSTALLTEAROFFMODELCON
  # endif
! #endif // VMS
  
  #ifdef HAVE_FLOCK
  # include <sys/file.h>
*** ../vim-8.2.2246/src/version.c       2020-12-29 20:53:28.299402080 +0100
--- src/version.c       2020-12-30 13:12:26.626812268 +0100
***************
*** 752,753 ****
--- 752,755 ----
  {   /* Add new patch number below this line */
+ /**/
+     2247,
  /**/

-- 
Light travels faster than sound.  This is why some people
appear bright until you hear them speak

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202012301215.0BUCFAbB912398%40masaka.moolenaar.net.

Raspunde prin e-mail lui