+/* These variables are valid only if nonempty. */
+static char cached_no_such_uname[UNAME_FIELD_SIZE] = "";
+static char cached_no_such_gname[GNAME_FIELD_SIZE] = "";
+
+/* These variables are valid only if nonzero. It's not worth optimizing
+ the case for weird systems where 0 is not a valid uid or gid. */
+static uid_t cached_no_such_uid = 0;
+static gid_t cached_no_such_gid = 0;
+