From 2e62f31ca5853fdd1e587f8c45d09cc6a45ce40b Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Wed, 4 Mar 2009 17:56:23 +0000 Subject: part 1 of mingw32 patches from Taco git-svn-id: svn://tug.org/texlive/trunk@12307 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/kpathsea/progname.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Build/source/texk/kpathsea/progname.c') 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 #endif +#ifdef __MINGW32__ +#include +#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. */ -- cgit v1.2.3