patch 8.0.0173: build fails with EBCDIC defined v8.0.0173
authorBram Moolenaar <Bram@vim.org>
Thu, 12 Jan 2017 19:06:33 +0000 (20:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 12 Jan 2017 19:06:33 +0000 (20:06 +0100)
Problem:    When compiling with EBCDIC defined the build fails. (Yaroslav
            Kuzmin)
Solution:   Move sortFunctions() to the right file.  Avoid warning for
            redefining __SUSV3.

src/eval.c
src/evalfunc.c
src/os_unixx.h
src/version.c

index 11fc035fb40750114ef4e060ae0dcc9170ce2078..5bed90b3b5560c2e3d3d59b5ad782e2d6ea6dc18 100644 (file)
@@ -242,14 +242,38 @@ static void list_one_var(dictitem_T *v, char_u *prefix, int *first);
 static void list_one_var_a(char_u *prefix, char_u *name, int type, char_u *string, int *first);
 static char_u *find_option_end(char_u **arg, int *opt_flags);
 
-#ifdef EBCDIC
-static int compare_func_name(const void *s1, const void *s2);
-static void sortFunctions();
-#endif
-
 /* for VIM_VERSION_ defines */
 #include "version.h"
 
+
+#if defined(EBCDIC) || defined(PROTO)
+/*
+ * Compare struct fst by function name.
+ */
+    static int
+compare_func_name(const void *s1, const void *s2)
+{
+    struct fst *p1 = (struct fst *)s1;
+    struct fst *p2 = (struct fst *)s2;
+
+    return STRCMP(p1->f_name, p2->f_name);
+}
+
+/*
+ * Sort the function table by function name.
+ * The sorting of the table above is ASCII dependant.
+ * On machines using EBCDIC we have to sort it.
+ */
+    static void
+sortFunctions(void)
+{
+    int                funcCnt = (int)(sizeof(functions) / sizeof(struct fst)) - 1;
+
+    qsort(functions, (size_t)funcCnt, sizeof(struct fst), compare_func_name);
+}
+#endif
+
+
 /*
  * Initialize the global and v: variables.
  */
index efa07b1114fb4578eb64f40d2ca0ffaa7f102aa1..768a0f1574405ab8b987eba4cbf727460c8175a5 100644 (file)
@@ -923,34 +923,6 @@ get_expr_name(expand_T *xp, int idx)
 
 #endif /* FEAT_CMDL_COMPL */
 
-#if defined(EBCDIC) || defined(PROTO)
-/*
- * Compare struct fst by function name.
- */
-    static int
-compare_func_name(const void *s1, const void *s2)
-{
-    struct fst *p1 = (struct fst *)s1;
-    struct fst *p2 = (struct fst *)s2;
-
-    return STRCMP(p1->f_name, p2->f_name);
-}
-
-/*
- * Sort the function table by function name.
- * The sorting of the table above is ASCII dependant.
- * On machines using EBCDIC we have to sort it.
- */
-    static void
-sortFunctions(void)
-{
-    int                funcCnt = (int)(sizeof(functions) / sizeof(struct fst)) - 1;
-
-    qsort(functions, (size_t)funcCnt, sizeof(struct fst), compare_func_name);
-}
-#endif
-
-
 /*
  * Find internal function in table above.
  * Return index, or -1 if not found
index f1aad2c50c84fade681e548b97d7146e3be05b23..c83ea31e4fc8e8bee258adfc142e0c341f1b0c2c 100644 (file)
 
 /* shared library access */
 #if defined(HAVE_DLFCN_H) && defined(USE_DLOPEN)
-# ifdef __MVS__
+# if defined(__MVS__) && !defined (__SUSV3)
     /* needed to define RTLD_LAZY (Anthony Giorgio) */
 #  define __SUSV3
 # endif
index a6bbf1b131b22207f48d157eca5640eee17ff48d..638e350dcb8e60913d243a745fa0b35ac46aff6a 100644 (file)
@@ -764,6 +764,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    173,
 /**/
     172,
 /**/