Commit 03e8ffa3 authored by Guido van Rossum's avatar Guido van Rossum

patches for NeXT weirdness

parent f5c6d47e
......@@ -49,7 +49,13 @@ static object *mkgrent(p)
v = mkvalue("(sslO)",
p->gr_name,
p->gr_passwd,
#if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__)
/* Correct a bug present on Intel machines in NextStep 3.2 and 3.3;
for later versions you may have to remove this */
(long)p->gr_short_pad, /* ugh-NeXT broke the padding */
#else
(long)p->gr_gid,
#endif
w);
DECREF(w);
return v;
......
......@@ -36,8 +36,15 @@ static object *mkpwent(p)
return mkvalue("(ssllsss)",
p->pw_name,
p->pw_passwd,
#if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__)
/* Correct a bug present on Intel machines in NextStep 3.2 and 3.3;
for later versions you may have to remove this */
(long)p->pw_short_pad1, /* ugh-NeXT broke the padding */
(long)p->pw_short_pad2,
#else
(long)p->pw_uid,
(long)p->pw_gid,
#endif
p->pw_gecos,
p->pw_dir,
p->pw_shell);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment