From acb2dd330d626a6137763206177fc042befd08f0 Mon Sep 17 00:00:00 2001 From: alx Date: Fri, 30 Dec 2016 02:43:57 +0100 Subject: [PATCH] dtksh/sfio: resolved a naming collision on FreeBSD 11 --- cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h | 2 +- cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclrlock.c | 4 ++-- cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfio_t.h | 2 +- cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnew.c | 2 +- cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfset.c | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h b/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h index b9caca8f..5394d106 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/include/sfio.h @@ -224,7 +224,7 @@ struct _sfio_ #define SF_IOCHECK 0002000 /* call exceptf before doing IO */ #define SF_PUBLIC 0004000 /* SF_SHARE and follow physical seek */ -#define SF_FLAGS 0005177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */ +#define SFIO_FLAGS 0005177 /* PUBLIC FLAGS PASSABLE TO SFNEW() */ #define SF_SETS 0007163 /* flags passable to sfset() */ /* exception events: SF_NEW(0), SF_READ(1), SF_WRITE(2) and the below */ diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclrlock.c b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclrlock.c index 8afa5b6a..6a8a8a1f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclrlock.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfclrlock.c @@ -66,7 +66,7 @@ reg Sfio_t *f; f->flags &= ~(SF_ERROR|SF_EOF); if(!(f->mode&(SF_LOCK|SF_PEEK)) ) - return (f->flags&SF_FLAGS); + return (f->flags&SFIO_FLAGS); /* clear peek locks */ f->mode &= ~SF_PEEK; @@ -78,5 +78,5 @@ reg Sfio_t *f; f->mode &= (SF_RDWR|SF_INIT|SF_POOL|SF_PUSH|SF_SYNCED|SF_STDIO); - return _sfmode(f,0,0) < 0 ? 0 : (f->flags&SF_FLAGS); + return _sfmode(f,0,0) < 0 ? 0 : (f->flags&SFIO_FLAGS); } diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfio_t.h b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfio_t.h index 1d8df2c9..5b9ed411 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfio_t.h +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfio_t.h @@ -82,7 +82,7 @@ (unsigned char*)(data), /* endr */ \ (unsigned char*)(data), /* endb */ \ (struct _sfio_*)0, /* push */ \ - (unsigned short)((type)&SF_FLAGS), /* flags */ \ + (unsigned short)((type)&SFIO_FLAGS), /* flags */ \ (short)(file), /* file */ \ (unsigned char*)(data), /* data */ \ (int)(size), /* size */ \ diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnew.c b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnew.c index 95186269..ecb21aa6 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnew.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfnew.c @@ -115,7 +115,7 @@ int flags; /* type of file stream */ /* stream type */ f->mode = (flags&SF_READ) ? SF_READ : SF_WRITE; - f->flags = (flags&SF_FLAGS) | ((flags&SF_RDWR) == SF_RDWR ? SF_BOTH : 0); + f->flags = (flags&SFIO_FLAGS) | ((flags&SF_RDWR) == SF_RDWR ? SF_BOTH : 0); f->flags |= (sflags&(SF_MALLOC|SF_STATIC)); f->file = file; f->here = f->extent = 0L; diff --git a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfset.c b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfset.c index a7d8122a..0ded609f 100644 --- a/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfset.c +++ b/cde/programs/dtksh/ksh93/src/lib/libast/sfio/sfset.c @@ -62,7 +62,7 @@ reg int set; reg int oflags; if(flags == 0) - return (f->flags&SF_FLAGS); + return (f->flags&SFIO_FLAGS); if((oflags = (f->mode&SF_RDWR)) != f->mode && _sfmode(f,oflags,0) < 0) return 0; @@ -98,5 +98,5 @@ reg int set; f->flags &= ~SF_PUBLIC; SFOPEN(f,0); - return (oflags&SF_FLAGS); + return (oflags&SFIO_FLAGS); } -- 2.25.1