77 *
88 *
99 * IDENTIFICATION
10- * $PostgreSQL: pgsql/src/port/exec.c,v 1.11 2004/05/20 15:35:41 momjian Exp $
10+ * $PostgreSQL: pgsql/src/port/exec.c,v 1.12 2004/05/20 15:38:11 momjian Exp $
1111 *
1212 *-------------------------------------------------------------------------
1313 */
@@ -179,7 +179,7 @@ validate_exec(char *path)
179179 * non-threaded binaries, not in library routines.
180180 */
181181int
182- find_my_exec (const char * argv0 ,char * full_path )
182+ find_my_exec (const char * argv0 ,char * retpath )
183183{
184184char cwd [MAXPGPATH ];
185185char * p ;
@@ -210,19 +210,19 @@ find_my_exec(const char *argv0, char *full_path)
210210}
211211
212212if (is_absolute_path (argv0 ))
213- StrNCpy (full_path ,argv0 ,MAXPGPATH );
213+ StrNCpy (retpath ,argv0 ,MAXPGPATH );
214214else
215- snprintf (full_path ,MAXPGPATH ,"%s/%s" ,cwd ,argv0 );
215+ snprintf (retpath ,MAXPGPATH ,"%s/%s" ,cwd ,argv0 );
216216
217- canonicalize_path (full_path );
218- if (validate_exec (full_path )== 0 )
217+ canonicalize_path (retpath );
218+ if (validate_exec (retpath )== 0 )
219219{
220- win32_make_absolute (full_path );
220+ win32_make_absolute (retpath );
221221return 0 ;
222222}
223223else
224224{
225- log_error ("invalid binary \"%s\"" ,full_path );
225+ log_error ("invalid binary \"%s\"" ,retpath );
226226return -1 ;
227227}
228228}
@@ -231,8 +231,8 @@ find_my_exec(const char *argv0, char *full_path)
231231/* Win32 checks the current directory first for names without slashes */
232232if (validate_exec (argv0 )== 0 )
233233{
234- snprintf (full_path ,MAXPGPATH ,"%s/%s" ,cwd ,argv0 );
235- win32_make_absolute (full_path );
234+ snprintf (retpath ,MAXPGPATH ,"%s/%s" ,cwd ,argv0 );
235+ win32_make_absolute (retpath );
236236return 0 ;
237237}
238238#endif
@@ -254,21 +254,21 @@ find_my_exec(const char *argv0, char *full_path)
254254* endp = '\0' ;
255255
256256if (is_absolute_path (startp ))
257- snprintf (full_path ,MAXPGPATH ,"%s/%s" ,startp ,argv0 );
257+ snprintf (retpath ,MAXPGPATH ,"%s/%s" ,startp ,argv0 );
258258else
259- snprintf (full_path ,MAXPGPATH ,"%s/%s/%s" ,cwd ,startp ,argv0 );
259+ snprintf (retpath ,MAXPGPATH ,"%s/%s/%s" ,cwd ,startp ,argv0 );
260260
261- canonicalize_path (full_path );
262- switch (validate_exec (full_path ))
261+ canonicalize_path (retpath );
262+ switch (validate_exec (retpath ))
263263{
264264case 0 :/* found ok */
265- win32_make_absolute (full_path );
265+ win32_make_absolute (retpath );
266266free (path );
267267return 0 ;
268268case -1 :/* wasn't even a candidate, keep looking */
269269break ;
270270case -2 :/* found but disqualified */
271- log_error ("could not read binary \"%s\"" ,full_path );
271+ log_error ("could not read binary \"%s\"" ,retpath );
272272free (path );
273273return -1 ;
274274}
@@ -286,7 +286,7 @@ find_my_exec(const char *argv0, char *full_path)
286286 *Win32 has a native way to find the executable name, but the above
287287 *method works too.
288288 */
289- if (GetModuleFileName (NULL ,full_path , MAXPGPATH )== 0 )
289+ if (GetModuleFileName (NULL ,retpath , MAXPGPATH )== 0 )
290290log_error ("GetModuleFileName failed (%i)" ,(int )GetLastError ());
291291#endif
292292}