Mail Archives: cygwin-developers/2000/01/08/18:54:29
On Sat, 8 Jan 2000, Corinna Vinschen wrote:
> Moreover, I couldn't find any problem with ntsec. What kind of
> problem did you find, Chris? Do you have more detailed info?
My recollection was that one user said that chmod or some such
utility wasn't working, and Chris and Anders tracked it down
to the definition of LARGE_INTEGER. The reason was multifold:
- w32api headers were missing pragma pack directives in a few
places. It was mostly this that caused the problem.
- Cygnus compiler had a bug dealing with packing directives, but
that affected other structures, so caused other mostly silent
bugs. My patches were stuck and were not accepted into gcc until
recently (these have been in my releases since egcs-1.1.x days),
and that explains why Cygnus compiler had the bug as well.
To work around this bug, as opposed to fixing it ;-), the LARGE
integer structure was tagged as PACKED.
It was later fixed (see ChangeLog and search for LARGE_INTEGER).
Also, some of the other needed #pragma pack() directives were missing
causing a mess. I've added those as well (see ChangeLog).
I also reverted some incorrect changes, which were probably added to
work around packing problems. Here's the relevant ChangeLog entry:
Wed Nov 3 19:34:12 1999 Mumit Khan <khan AT xraylith DOT wisc DOT edu>
Fix Merge errors:
* include/winnt.h (PSID): Uncomment definition.
(PISID): Rename from PSID.
(struct _TAPE_GET_MEDIA_PARAMETER): Remove reserved field.
(struct _SECURITY_ATTRIBUTES): Remove multiple definition.
(PISID was wrong, but had nothing to do with packing of course).
I'm not 100% certain that all my changes are correct, but the headers
are certainly in much better shape. While trying to track down various
"bad" structures, I ended up creating a set of testcases that check
for structure sizes against what MSVC reports. I'll add those to the
w32api/test directory sometime soon.
Regards,
Mumit
- Raw text -