This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Reject invalid definitions of _POSIX_CHOWN_RESTRICTED, _POSIX_NO_TRUNC, _POSIX_VDISABLE


Dmitry V. Levin, on lun. 29 janv. 2018 01:50:51 +0300, wrote:
> >      case _PC_VDISABLE:
> > -#ifdef	_POSIX_VDISABLE
> > -      return _POSIX_VDISABLE;
> > -#else
> > -      return -1;
> > +#if _POSIX_VDISABLE == -1
> > +# error "Invalid value for _POSIX_VDISABLE"
> >  #endif
> > +      return _POSIX_VDISABLE;
> 
> sysdeps/mach/hurd/bits/posix_opt.h defines _POSIX_VDISABLE
> to ((unsigned char) -1), should it be fixed, too?

Posix says that using -1 is invalid, indeed.

Samuel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]