summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/progname.c
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-04 17:56:23 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-04 17:56:23 +0000
commit2e62f31ca5853fdd1e587f8c45d09cc6a45ce40b (patch)
tree82bb7716f043ff0bf7dc70d25597b6aac05153fd /Build/source/texk/kpathsea/progname.c
parent44167180edb89f78e62c9105af13218390561c52 (diff)
part 1 of mingw32 patches from Taco
git-svn-id: svn://tug.org/texlive/trunk@12307 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/progname.c')
-rw-r--r--Build/source/texk/kpathsea/progname.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/Build/source/texk/kpathsea/progname.c b/Build/source/texk/kpathsea/progname.c
index 253d54bd2db..5aee83ca7a0 100644
--- a/Build/source/texk/kpathsea/progname.c
+++ b/Build/source/texk/kpathsea/progname.c
@@ -28,6 +28,10 @@
#include <kpathsea/c-pathmx.h>
#endif
+#ifdef __MINGW32__
+#include <kpathsea/mingw32.h>
+#endif
+
#if defined(__i386_pc_gnu__)
#ifndef _S_ISUID
#define _S_ISUID 04000 /* Set user ID on execution. */
@@ -351,8 +355,8 @@ remove_dots P1C(string, dir)
/* Return directory ARGV0 comes from. Check PATH if ARGV0 is not
absolute. */
-static string
-selfdir P1C(const_string, argv0)
+string
+kpse_selfdir P1C(const_string, argv0)
{
string ret = NULL;
string self = NULL;
@@ -483,8 +487,8 @@ kpse_set_program_name P2C(const_string, argv0, const_string, progname)
}
}
/* Win95 always gives the short filename for argv0, not the long one.
- There is only this way to catch it. It makes all the selfdir stuff
- useless for win32. */
+ There is only this way to catch it. It makes all the kpse_selfdir
+ stuff useless for win32. */
{
char short_path[PATH_MAX], path[PATH_MAX], *fp;
@@ -565,10 +569,10 @@ kpse_set_program_name P2C(const_string, argv0, const_string, progname)
#endif
/* We need to find SELFAUTOLOC *before* removing the ".exe" suffix from
- the program_name, otherwise the PATH search inside selfdir will fail,
+ the program_name, otherwise the PATH search inside kpse_selfdir will fail,
since `prog' doesn't exists as a file, there's `prog.exe' instead. */
#ifndef WIN32
- sdir = selfdir (program_invocation_name);
+ sdir = kpse_selfdir (program_invocation_name);
#endif
/* SELFAUTODIR is actually the parent of the invocation directory,
and SELFAUTOPARENT the grandparent. This is how teTeX did it. */