[Libsysio-commit] HEAD: libsysio/misc fhi.h
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2009-08-17 23:02:40
|
Update of /cvsroot/libsysio/libsysio/misc In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv31901 Modified Files: fhi.h Log Message: It's official. I can't do token pasting to save my life. FIXED! The token pasting madness I was engaged in was generating bad symbols. Also, the attr CLEAR macro was clearing the values but setting all the indicators to 'set' those values. Big oops. All fixed now, I believe. Index: fhi.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/misc/fhi.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- fhi.h 3 Aug 2009 23:03:53 -0000 1.2 +++ fhi.h 17 Aug 2009 23:02:26 -0000 1.3 @@ -76,9 +76,9 @@ struct file_handle_info_sattr { /* * Set an attribute value in the passed buffer. */ -#define _FHISATTR_SET(_fhisattr, _n, _v) \ +#define _FHISATTR_SET(_fhisattr, _n, _f, _v) \ do { \ - (_fhisattr)->fhisattr_ ##_n _set = 1; \ + (_fhisattr)->fhisattr_##_n##_set = (_f); \ (_fhisattr)->fhisattr_ ##_n = (_v); \ } while (0) @@ -87,17 +87,17 @@ struct file_handle_info_sattr { * attribute record. */ #define FHISATTR_SET_MODE(_fhisattr, _v) \ - _FHISATTR_SET((_fhisattr), mode, (_v) & 07777) + _FHISATTR_SET((_fhisattr), mode, 1, (_v) & 07777) #define FHISATTR_SET_UID(_fhisattr, _v) \ - _FHISATTR_SET((_fhisattr), uid, (_v)) + _FHISATTR_SET((_fhisattr), uid, 1, (_v)) #define FHISATTR_SET_GID(_fhisattr, _v) \ - _FHISATTR_SET((_fhisattr), gid, (_v)) + _FHISATTR_SET((_fhisattr), gid, 1, (_v)) #define FHISATTR_SET_SIZE(_fhisattr, _v) \ - _FHISATTR_SET((_fhisattr), size, (_v)) + _FHISATTR_SET((_fhisattr), size, 1, (_v)) #define FHISATTR_SET_ATIME(_fhisattr, _v) \ - _FHISATTR_SET((_fhisattr), atime, (_v)) + _FHISATTR_SET((_fhisattr), atime, 1, (_v)) #define FHISATTR_SET_MTIME(_fhisattr, _v) \ - _FHISATTR_SET((_fhisattr), mtime, (_v)) + _FHISATTR_SET((_fhisattr), mtime, 1, (_v)) /* * Clear all attribute values in passed file handle info set attribute record @@ -105,12 +105,12 @@ struct file_handle_info_sattr { */ #define FHISATTR_CLEAR(_fhisattr) \ do { \ - FHISATTR_MODE_SET((_fhisattr), 0); \ - FHISATTR_UID_SET((_fhisattr), -1); \ - FHISATTR_GID_SET((_fhisattr), -1); \ - FHISATTR_SIZE_SET((_fhisattr), 0); \ - FHISATTR_ATIME_SET((_fhisattr), 0); \ - FHISATTR_MTIME_SET((_fhisattr), 0); \ + _FHISATTR_SET((_fhisattr), mode, 0, 0); \ + _FHISATTR_SET((_fhisattr), uid, 0, -1); \ + _FHISATTR_SET((_fhisattr), gid, 0, -1); \ + _FHISATTR_SET((_fhisattr), size, 0, 0); \ + _FHISATTR_SET((_fhisattr), atime, 0, 0); \ + _FHISATTR_SET((_fhisattr), mtime, 0, 0); \ } while (0); /* |