lkml.org 
[lkml]   [2003]   [Oct]   [1]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] linuxabi
FromPhilippe Troin <>
Date30 Sep 2003 22:22:05 -0700
"H. Peter Anvin" <hpa@zytor.com> writes:

> Followup to:  <20031001033437.GP7665@parcelfarce.linux.theplanet.co.uk>
> By author:    viro@parcelfarce.linux.theplanet.co.uk
> In newsgroup: linux.dev.kernel
> >
> > On Wed, Oct 01, 2003 at 04:05:57AM +0200, Bernd Eckenfels wrote:
> > 
> > > > +#define MS_NODIRATIME  2048    /* Do not update directory access times */
> > > > +#define MS_BIND                4096
> > > > +#define MS_POSIXACL    (1<<16) /* VFS does not apply the umask */
> > > 
> > > can we clean that up? with shifting, without shifting, with comments and without comments? I suggest to use the linuxdoc comments mandatory for the abi files.
> > 
> > 
> > ... and make it enum, while we are at it.  It's cleaner, it survives cpp
> > and it can be handled by gdb et.al. in sane way.
> > 
> > Unless we really want to support pre-v7 compilers, there is no benefit
> > in using #define for such constants.
> 
> ... except you can use #ifdef to test for obsolete headers.

A common uber-ugly trick (seen in Solaris headers) to solve this
problem is:

  enum {
  #define FOO FOO
    FOO,
  #define BAR BAR
    BAR
  } 
Phil.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:49    [from the cache]
©2003-2008