This is the mail archive of the
mailing list for the Cygwin project.
standalone cygwin programs that use "/tmp" don't work
- From: "John R. McPherson" <jrm21 at cs dot waikato dot ac dot nz>
- To: cygwin at cygwin dot com
- Date: Tue, 13 Aug 2002 16:28:43 +1200
- Subject: standalone cygwin programs that use "/tmp" don't work
I'm a developer for some digital library software (http://greenstone.org).
For our windows version, we use cygwin to compile some third-party file
converters such as wvWare.
Our windows distribution includes these binaries as well as cygwin1.dll.
However, we've only recently noticed that these programs fail on some
windows machines. It turns out that they run fine if cygwin is installed,
and fail if it isn't. The problem is when these programs use a function
such as mkstemp() or tmpnam(), the cygwin1.dll will use "/tmp" relative
to the mount points, but if cygwin has never been installed on that
machine, then it defaults to "\\tmp" on the current windows drive.
Ie, removing/renaming the key HKLM\SOFTWARE\Cygnus\Cygwin\mounts v2\"/"
will cause these cygwin1.dll linked programs to run, but fail to
work correctly as file access to "/tmp/whatever" fails.
Other than forcing users to create a "X:\\tmp" directory (or doing this
during installation) or modifying the source code for these 3rd-party
packages, is there any way to get the dll to use windows's %TEMP%
or %TMPDIR% environment variables? The version we are distributing is
version 1.3.10 of the dll, but using the latest version didn't make
Any info or pointers would be greatly appreciated.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html