summaryrefslogtreecommitdiffstats
path: root/contrib/nvi
diff options
context:
space:
mode:
authorjh <jh@FreeBSD.org>2013-05-15 18:41:49 +0000
committerjh <jh@FreeBSD.org>2013-05-15 18:41:49 +0000
commitc5c3f4f392975f0ffee18a566ed088e8426f41c5 (patch)
treeac4ce651ae0a8a2220c59abc7532a20ada2f8c9e /contrib/nvi
parent9a44ba5a35ddfdecc900866bb22238baa2953a3f (diff)
downloadFreeBSD-src-c5c3f4f392975f0ffee18a566ed088e8426f41c5.zip
FreeBSD-src-c5c3f4f392975f0ffee18a566ed088e8426f41c5.tar.gz
Rename O_DIRECTORY to O_TMP_DIRECTORY to avoid shadowing the fcntl.h
O_DIRECTORY flag. PR: bin/173924 Obtained from: git://repo.or.cz/nvi.git
Diffstat (limited to 'contrib/nvi')
-rw-r--r--contrib/nvi/common/exf.c4
-rw-r--r--contrib/nvi/common/options.c6
-rw-r--r--contrib/nvi/include/options_def.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/contrib/nvi/common/exf.c b/contrib/nvi/common/exf.c
index e332f470..b0c438d 100644
--- a/contrib/nvi/common/exf.c
+++ b/contrib/nvi/common/exf.c
@@ -187,10 +187,10 @@ file_init(sp, frp, rcv_name, flags)
*/
oname = frp->name;
if (LF_ISSET(FS_OPENERR) || oname == NULL || !exists) {
- if (opts_empty(sp, O_DIRECTORY, 0))
+ if (opts_empty(sp, O_TMP_DIRECTORY, 0))
goto err;
(void)snprintf(tname, sizeof(tname),
- "%s/vi.XXXXXXXXXX", O_STR(sp, O_DIRECTORY));
+ "%s/vi.XXXXXXXXXX", O_STR(sp, O_TMP_DIRECTORY));
if ((fd = mkstemp(tname)) == -1) {
msgq(sp, M_SYSERR,
"237|Unable to create temporary file");
diff --git a/contrib/nvi/common/options.c b/contrib/nvi/common/options.c
index fe310fc..dea4eba 100644
--- a/contrib/nvi/common/options.c
+++ b/contrib/nvi/common/options.c
@@ -64,7 +64,7 @@ OPTLIST const optlist[] = {
{"columns", f_columns, OPT_NUM, OPT_NOSAVE},
/* O_COMMENT 4.4BSD */
{"comment", NULL, OPT_0BOOL, 0},
-/* O_DIRECTORY 4BSD */
+/* O_TMP_DIRECTORY 4BSD */
{"directory", NULL, OPT_STR, 0},
/* O_EDCOMPATIBLE 4BSD */
{"edcompatible",NULL, OPT_0BOOL, 0},
@@ -244,7 +244,7 @@ static OABBREV const abbrev[] = {
{"aw", O_AUTOWRITE}, /* 4BSD */
{"bf", O_BEAUTIFY}, /* 4BSD */
{"co", O_COLUMNS}, /* 4.4BSD */
- {"dir", O_DIRECTORY}, /* 4BSD */
+ {"dir", O_TMP_DIRECTORY}, /* 4BSD */
{"eb", O_ERRORBELLS}, /* 4BSD */
{"ed", O_EDCOMPATIBLE}, /* 4BSD */
{"ex", O_EXRC}, /* System V (undocumented) */
@@ -347,7 +347,7 @@ opts_init(sp, oargs)
*/
(void)snprintf(b1, sizeof(b1),
"directory=%s", (s = getenv("TMPDIR")) == NULL ? _PATH_TMP : s);
- OI(O_DIRECTORY, b1);
+ OI(O_TMP_DIRECTORY, b1);
OI(O_ESCAPETIME, "escapetime=6");
OI(O_KEYTIME, "keytime=6");
OI(O_MATCHTIME, "matchtime=7");
diff --git a/contrib/nvi/include/options_def.h b/contrib/nvi/include/options_def.h
index d2e637c..c2ef565 100644
--- a/contrib/nvi/include/options_def.h
+++ b/contrib/nvi/include/options_def.h
@@ -8,7 +8,7 @@
#define O_CEDIT 7
#define O_COLUMNS 8
#define O_COMMENT 9
-#define O_DIRECTORY 10
+#define O_TMP_DIRECTORY 10
#define O_EDCOMPATIBLE 11
#define O_ESCAPETIME 12
#define O_ERRORBELLS 13
OpenPOWER on IntegriCloud