delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/28/11:50:09

From: stuerzl AT cs DOT unc DOT edu (Wolfgang Stuerzlinger)
Subject: Problem with getenv("HOME")
28 Oct 1997 11:50:09 -0800 :
Message-ID: <Pine.HPP.3.96.971028103827.1725G-100000.cygnus.gnu-win32@catfish.cs.unc.edu>
References: <Pine DOT HPP DOT 3 DOT 96 DOT 971027173227 DOT 28460D-100000 AT catfish DOT cs DOT unc DOT edu>
Reply-To: Wolfgang Stuerzlinger <stuerzl AT cs DOT unc DOT edu>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com
Cc: edel AT fnal DOT fov

By default the environment variable HOME is not set in the GNU-Win32
environment.
When getenv is called with ("HOME") as argument the return value is a
string "(null)" instead of a NULL pointer. Is this a "standard" behaviour 
or a bug?

Wolfgang Stuerzlinger

P.S.: This breaks commonly used code sequences like:
	sprintf(newName,"%s/%s",getenv("HOME"),fileName);
--
Wolfgang Stuerzlinger
Dept. of Computer Science, UNC, Chapel Hill, NC 27599-3175
stuerzl AT cs DOT unc DOT edu          http://www.cs.unc.edu/~stuerzl



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019