delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2009/07/25/21:45:06

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:date:message-id:subject
:from:to:content-type:content-transfer-encoding;
bh=Ki8M8yeoteu6+gzP+B2guOD7GWdEAZOwOVjs1F0RY9s=;
b=lj0sSJ0GPdWzKrtovKlyeeZmODr8zPp1jpKExAW7EyOkBgy044uod4cknpQKZ6HJPG
Oqk2inYfYQHSOy3b1AnjlHfCZXz0Y4oCDO97vq7qSRYtpC//Cts5WpkMGgmelYrcJk35
DGzY1D2+jok7xnCrfZAsrUMgjtKJXfkFYCFvI=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:date:message-id:subject:from:to:content-type
:content-transfer-encoding;
b=nBbuXqxOcKQHRojE2vfyEtPR/+HSFtsNZkYu1Jao+vebd8QWY5QAzKEtLjOvRqYxSn
PXZQ5K20bg4oIaoTiWu+QsOKOyWho15HFuolKqUx9r9T2Z2LKq0+Nqr2lTI70XrkuCp3
O305TCK+3TcYm7tIMEORW3nWXOumBeo8qm0+U=
MIME-Version: 1.0
Date: Sat, 25 Jul 2009 20:44:53 -0500
Message-ID: <93c172b50907251844w7c200c29nbf1ff8b95f0ab5dc@mail.gmail.com>
Subject: stdio.h : #define P_tmpdir "c:/" /* bad idea */
From: Rugxulo <rugxulo AT gmail DOT com>
To: djgpp-workers AT delorie DOT com
Reply-To: djgpp-workers AT delorie DOT com

Hey guys,
   I could've sworn I mentioned this before, but a quick search of the
newsgroup doesn't show it. Anyways, P_tmpdir (stdio.h) being equal to
"c:/" seems like a bad idea in general, and in particular it makes
some things fail on Vista (e.g. mkstemp used for
shell-command-on-region in ZILE). Don't most tools already assume that
at least %TEMP% is defined? So why not change this to "/dev/env/TEMP/"
instead? ("c:/" might not even exist!)

          char tempfile[] = "/dev/env/TEMP/ziXXXXXX"; // P_tmpdir "/zileXXXXXX";
          int fd = mkstemp (tempfile);

- Raw text -


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