patches for NeXT weirdness

This commit is contained in:
Guido van Rossum 1995-02-07 15:38:56 +00:00
parent f5c6d47e96
commit 03e8ffa345
2 changed files with 13 additions and 0 deletions

View File

@ -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;

View File

@ -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);