All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: "Jon A. Christopher" <jon@amanda.tamu.edu>
To: linuxppc-dev@lists.linuxppc.org
Subject: bug in getenv/putenv on linuxppc/G4
Date: Mon, 1 Nov 1999 02:02:55 -0600 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.04.9911010157580.7854-200000@amanda.tamu.edu> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 877 bytes --]

I've just discovered a bug in either getenv (probably) or putenv (less
likely) on linuxppc on a G4, glibc-2.1.1-6c.

The attached test program demonstrates the bug.  Basically, using putenv
to add a variable to the environment whose name is only one letter long
and then using getenv to read it doesn't work.  

Variables with two or more letters are processed as normal.

I'm not sure if this is a glibc or a linuxppc problem, but I don't have
teh same problem on my intel RH 5.2 box, or any other unix I've ever heard
of.

-jon

Please CC replies to me, since I'm not on this list.

-- 
Dr. Jon A. Christopher              / jac8792@tamu.edu |  Project URLs:
Department of Biochem./Biophys.    /  spock: http://quorum.tamu.edu/spock
Texas A&M University MS-2128      / lesstif: http://www.lesstif.org/
College Station, TX, 77843       / personal: http://quorum.tamu.edu/jon


[-- Attachment #2: Type: TEXT/PLAIN, Size: 237 bytes --]

#include <stdio.h>
#include <stdlib.h>

main()
{
  /* doesn't work on ppc, but should */
  putenv("i=1");
  printf("got: i=%s\n",getenv("i"));

  /* works on ppc */
  putenv("ii=1");
  printf("got: ii=%s\n",getenv("ii"));
}

             reply	other threads:[~1999-11-01  8:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-01  8:02 Jon A. Christopher [this message]
1999-11-01 12:55 ` bug in getenv/putenv on linuxppc/G4 Marcus Sundberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.04.9911010157580.7854-200000@amanda.tamu.edu \
    --to=jon@amanda.tamu.edu \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.