# HG changeset patch # User Bram Moolenaar # Date 1678022105 -3600 # Node ID fcc497515cce63747015a70db33bbe6e05578cb4 # Parent 9b58bd826012ed5ce58e93138a7a2f7c19ffccbc patch 9.0.1381: ACCESS_ names have a conflict with on some systems Commit: https://github.com/vim/vim/commit/d8742476d11e75e3b733f21d9aeac1cbd2a02c6f Author: =?UTF-8?q?Ola=20S=C3=B6der?= Date: Sun Mar 5 13:12:32 2023 +0000 patch 9.0.1381: ACCESS_ names have a conflict with on some systems Problem: ACCESS_ names have a conflict with on some systems. Solution: Rename by prepending VIM_. (Ola S?der, closes https://github.com/vim/vim/issues/12105) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -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; } diff --git a/src/fileio.c b/src/fileio.c --- a/src/fileio.c +++ b/src/fileio.c @@ -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 diff --git a/src/structs.h b/src/structs.h --- a/src/structs.h +++ b/src/structs.h @@ -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; /* diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1381, +/**/ 1380, /**/ 1379, diff --git a/src/vim9class.c b/src/vim9class.c --- a/src/vim9class.c +++ b/src/vim9class.c @@ -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;