]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
patches for NeXT weirdness
authorGuido van Rossum <guido@python.org>
Tue, 7 Feb 1995 15:38:56 +0000 (15:38 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 7 Feb 1995 15:38:56 +0000 (15:38 +0000)
Modules/grpmodule.c
Modules/pwdmodule.c

index ecb9ade8393135bc19fe1d6e0d40d7336774d197..cff9d83f35a5ab482b3d05f19c1fa032fbfef180 100644 (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;
index a9253c2d365542b680f1e419a4cba57bb70ae0e2..ec0e848f7b2b4d7bb2bf2a04a5f76e2b715d579b 100644 (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);