]> granicus.if.org Git - vim/commitdiff
patch 9.0.1381: ACCESS_ names have a conflict with on some systems v9.0.1381
author=?UTF-8?q?Ola=20S=C3=B6der?= <rolfkopman@gmail.com>
Sun, 5 Mar 2023 13:12:32 +0000 (13:12 +0000)
committerBram Moolenaar <Bram@vim.org>
Sun, 5 Mar 2023 13:12:32 +0000 (13:12 +0000)
Problem:    ACCESS_ names have a conflict with on some systems.
Solution:   Rename by prepending VIM_. (Ola Söder, closes #12105)

src/eval.c
src/fileio.c
src/structs.h
src/version.c
src/vim9class.c

index 0d32fa046f9e93b6a5d9c0fb1840ac21196622b1..a647b514f2884a606a5a245be00e7c7baab2f7ef 100644 (file)
@@ -1576,11 +1576,11 @@ get_lval(
                        {
                            switch (om->ocm_access)
                            {
-                               case ACCESS_PRIVATE:
+                               case VIM_ACCESS_PRIVATE:
                                        semsg(_(e_cannot_access_private_member_str),
                                                                 om->ocm_name);
                                        return NULL;
-                               case ACCESS_READ:
+                               case VIM_ACCESS_READ:
                                        if ((flags & GLV_READ_ONLY) == 0)
                                        {
                                            semsg(_(e_member_is_not_writable_str),
@@ -1588,7 +1588,7 @@ get_lval(
                                            return NULL;
                                        }
                                        break;
-                               case ACCESS_ALL:
+                               case VIM_ACCESS_ALL:
                                        break;
                            }
 
index d8b395acfd3364f62ee6b7ba60cb6f87173972e5..5a2e388e4a5e1768c052789de443f7b304a77c93 100644 (file)
@@ -3830,7 +3830,7 @@ vim_rename(char_u *from, char_u *to)
      * original file will be somewhere else so the backup isn't really
      * important. If autoscripting is off the rename may fail.
      */
-    flock = Lock((UBYTE *)from, (long)ACCESS_READ);
+    flock = Lock((UBYTE *)from, (long)VIM_ACCESS_READ);
 #endif
     mch_remove(to);
 #ifdef AMIGA
index 46a71cb0d45fef2fc6192f35f9d20850a76a9ba6..39248a7e48e8b97f98d7d61396dcab795693691a 100644 (file)
@@ -1469,9 +1469,9 @@ typedef struct {
 #define TTFLAG_SUPER       0x40    // object from "super".
 
 typedef enum {
-    ACCESS_PRIVATE,    // read/write only inside th class
-    ACCESS_READ,       // read everywhere, write only inside th class
-    ACCESS_ALL         // read/write everywhere
+    VIM_ACCESS_PRIVATE,        // read/write only inside th class
+    VIM_ACCESS_READ,   // read everywhere, write only inside th class
+    VIM_ACCESS_ALL     // read/write everywhere
 } omacc_T;
 
 /*
index fbe5346868c2c68921edcbbd2ad7577f2890037f..19ea3e4a0267ba29e7ee14393ad6b773b78f62cf 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1381,
 /**/
     1380,
 /**/
index a2b186ec5a36e6fa7b3e7e67e0b1356074c672c3..74664f1b26919e5e685af68ab7d3b3367b3c821f 100644 (file)
@@ -148,8 +148,8 @@ add_member(
        return FAIL;
     ocmember_T *m = ((ocmember_T *)gap->ga_data) + gap->ga_len;
     m->ocm_name = vim_strnsave(varname, varname_end - varname);
-    m->ocm_access = has_public ? ACCESS_ALL
-                             : *varname == '_' ? ACCESS_PRIVATE : ACCESS_READ;
+    m->ocm_access = has_public ? VIM_ACCESS_ALL
+                     : *varname == '_' ? VIM_ACCESS_PRIVATE : VIM_ACCESS_READ;
     m->ocm_type = type;
     if (init_expr != NULL)
        m->ocm_init = init_expr;