2603. [port] win32: handle .exe extension of named-checkzone and

named-comilezone argv[0] names under windows.
                        [RT #19767]
This commit is contained in:
Mark Andrews 2009-05-29 02:14:31 +00:00
parent 7be6336565
commit fc7ecc628d
2 changed files with 11 additions and 3 deletions

View file

@ -1,3 +1,7 @@
2603. [port] win32: handle .exe extension of named-checkzone and
named-comilezone argv[0] names under windows.
[RT #19767]
2602. [port] win32: fix debugging command line build of libisccfg.
[RT #19767]

View file

@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: named-checkzone.c,v 1.53 2009/02/16 23:48:04 tbox Exp $ */
/* $Id: named-checkzone.c,v 1.54 2009/05/29 02:14:31 marka Exp $ */
/*! \file */
@ -123,9 +123,13 @@ main(int argc, char **argv) {
*/
if (strncmp(prog_name, "lt-", 3) == 0)
prog_name += 3;
if (strcmp(prog_name, "named-checkzone") == 0)
#define PROGCMP(X) \
(strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0)
if (PROGCMP("named-checkzone"))
progmode = progmode_check;
else if (strcmp(prog_name, "named-compilezone") == 0)
else if (PROGCMP("named-compilezone"))
progmode = progmode_compile;
else
INSIST(0);