From: Kern Sibbald Date: Wed, 26 Apr 2006 09:28:27 +0000 (+0000) Subject: Fix bug in build-win32-cross-tools script reported by Howard X-Git-Tag: Release-2.0.0~907 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fc92e04201e428fbf206dbd01518a02490ba50f9;p=bacula%2Fbacula Fix bug in build-win32-cross-tools script reported by Howard git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2973 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/kes-1.39 b/bacula/kes-1.39 index b8a864255f..e214dad2be 100644 --- a/bacula/kes-1.39 +++ b/bacula/kes-1.39 @@ -3,6 +3,7 @@ General: 26Apr06 +- Fix bug in build-win32-cross-tools script reported by Howard - Implement cross compiled bconsole 25Apr06 - Fix barcode test, eliminate BOOL (doesn't exist on Linux). diff --git a/bacula/src/dird/ua_cmds.c b/bacula/src/dird/ua_cmds.c index 4fe9dc9df0..29feea937e 100644 --- a/bacula/src/dird/ua_cmds.c +++ b/bacula/src/dird/ua_cmds.c @@ -153,9 +153,9 @@ int do_a_command(UAContext *ua, const char *cmd) len = strlen(ua->argk[0]); for (i=0; iargk[0], _(commands[i].key), len) == 0) { + if (strncasecmp(ua->argk[0], commands[i].key, len) == 0) { /* Check if command permitted, but "quit" is always OK */ - if (strcmp(ua->argk[0], "quit") != 0 && + if (strcmp(ua->argk[0], NT_("quit")) != 0 && !acl_access_ok(ua, Command_ACL, ua->argk[0], len)) { break; } @@ -178,7 +178,7 @@ int do_a_command(UAContext *ua, const char *cmd) void set_pool_dbr_defaults_in_media_dbr(MEDIA_DBR *mr, POOL_DBR *pr) { mr->PoolId = pr->PoolId; - bstrncpy(mr->VolStatus, "Append", sizeof(mr->VolStatus)); + bstrncpy(mr->VolStatus, NT_("Append"), sizeof(mr->VolStatus)); mr->Recycle = pr->Recycle; mr->VolRetention = pr->VolRetention; mr->VolUseDuration = pr->VolUseDuration; @@ -355,7 +355,7 @@ int automount_cmd(UAContext *ua, const char *cmd) onoff = ua->argk[1]; } - ua->automount = (strcasecmp(onoff, _("off")) == 0) ? 0 : 1; + ua->automount = (strcasecmp(onoff, NT_("off")) == 0) ? 0 : 1; return 1; } @@ -375,7 +375,7 @@ static int cancel_cmd(UAContext *ua, const char *cmd) } for (i=1; iargc; i++) { - if (strcasecmp(ua->argk[i], _("jobid")) == 0) { + if (strcasecmp(ua->argk[i], NT_("jobid")) == 0) { uint32_t JobId; if (!ua->argv[i]) { break; @@ -386,7 +386,7 @@ static int cancel_cmd(UAContext *ua, const char *cmd) return 1; } break; - } else if (strcasecmp(ua->argk[i], _("job")) == 0) { + } else if (strcasecmp(ua->argk[i], NT_("job")) == 0) { if (!ua->argv[i]) { break; } @@ -396,7 +396,7 @@ static int cancel_cmd(UAContext *ua, const char *cmd) bstrncpy(jcr->Job, ua->argv[i], sizeof(jcr->Job)); } break; - } else if (strcasecmp(ua->argk[i], _("ujobid")) == 0) { + } else if (strcasecmp(ua->argk[i], NT_("ujobid")) == 0) { if (!ua->argv[i]) { break; } @@ -578,7 +578,7 @@ extern DIRRES *director; */ static int python_cmd(UAContext *ua, const char *cmd) { - if (ua->argc >= 1 && strcasecmp(ua->argk[1], _("restart")) == 0) { + if (ua->argc >= 1 && strcasecmp(ua->argk[1], NT_("restart")) == 0) { term_python_interpreter(); init_python_interpreter(director->hdr.name, director->scripts_directory, "DirStartUp"); @@ -863,9 +863,9 @@ static int setdebug_cmd(UAContext *ua, const char *cmd) } } - if (strcasecmp(ua->argk[i], "store") == 0 || - strcasecmp(ua->argk[i], "storage") == 0 || - strcasecmp(ua->argk[i], "sd") == 0) { + if (strcasecmp(ua->argk[i], NT_("store")) == 0 || + strcasecmp(ua->argk[i], NT_("storage")) == 0 || + strcasecmp(ua->argk[i], NT_("sd")) == 0) { store = NULL; if (ua->argv[i]) { store = (STORE *)GetResWithName(R_STORAGE, ua->argv[i]); @@ -886,10 +886,10 @@ static int setdebug_cmd(UAContext *ua, const char *cmd) * prompt the user. */ start_prompt(ua, _("Available daemons are: \n")); - add_prompt(ua, "Director"); - add_prompt(ua, "Storage"); - add_prompt(ua, "Client"); - add_prompt(ua, "All"); + add_prompt(ua, _("Director")); + add_prompt(ua, _("Storage")); + add_prompt(ua, _("Client")); + add_prompt(ua, _("All")); switch(do_prompt(ua, "", _("Select daemon type to set debug level"), NULL, 0)) { case 0: /* Director */ debug_level = level; @@ -932,7 +932,7 @@ static int trace_cmd(UAContext *ua, const char *cmd) onoff = ua->argk[1]; } - set_trace((strcasecmp(onoff, _("off")) == 0) ? false : true); + set_trace((strcasecmp(onoff, NT_("off")) == 0) ? false : true); return 1; } @@ -969,30 +969,30 @@ static int estimate_cmd(UAContext *ua, const char *cmd) jcr->JobLevel = L_FULL; for (int i=1; iargc; i++) { - if (strcasecmp(ua->argk[i], "client") == 0 || - strcasecmp(ua->argk[i], "fd") == 0) { + if (strcasecmp(ua->argk[i], NT_("client")) == 0 || + strcasecmp(ua->argk[i], NT_("fd")) == 0) { if (ua->argv[i]) { client = (CLIENT *)GetResWithName(R_CLIENT, ua->argv[i]); continue; } } - if (strcasecmp(ua->argk[i], "job") == 0) { + if (strcasecmp(ua->argk[i], NT_("job")) == 0) { if (ua->argv[i]) { job = (JOB *)GetResWithName(R_JOB, ua->argv[i]); continue; } } - if (strcasecmp(ua->argk[i], "fileset") == 0) { + if (strcasecmp(ua->argk[i], NT_("fileset")) == 0) { if (ua->argv[i]) { fileset = (FILESET *)GetResWithName(R_FILESET, ua->argv[i]); continue; } } - if (strcasecmp(ua->argk[i], "listing") == 0) { + if (strcasecmp(ua->argk[i], NT_("listing")) == 0) { listing = 1; continue; } - if (strcasecmp(ua->argk[i], "level") == 0) { + if (strcasecmp(ua->argk[i], NT_("level")) == 0) { if (!get_level_from_name(ua->jcr, ua->argv[i])) { bsendmsg(ua, _("Level %s not valid.\n"), ua->argv[i]); } @@ -1574,7 +1574,7 @@ int qhelp_cmd(UAContext *ua, const char *cmd) unsigned int i; for (i=0; icached_pnl == pnl && strcmp(path, jcr->cached_path) == 0) { return 1; } - pm_strcpy(&jcr->cached_path, path); + pm_strcpy(jcr->cached_path, path); jcr->cached_pnl = pnl; return 0; } diff --git a/bacula/src/win32/build-win32-cross-tools b/bacula/src/win32/build-win32-cross-tools index f95aa35e15..a06ff6f76e 100755 --- a/bacula/src/win32/build-win32-cross-tools +++ b/bacula/src/win32/build-win32-cross-tools @@ -40,26 +40,20 @@ #----------------------------------------------------- -# What flavor of GCC cross-compiler are we building? - +# Directory where cross-tools directory will be placed +TOPDIR=../../.. +# Cross tools directory name under TOPDIR +CROSSTOOLS=cross-tools +# What flavor of GCC cross-compiler are we building? under CROSSTOOLS TARGET=mingw32 -# What directory will the cross-compiler be built in? -# This is the directory into which source archives will -# be downloaded, expanded, compiled, etc. You need to -# have write-access to this directory. If you leave it -# blank, it defaults to the current directory. - -#BUILDDIR=/data/cross-tools-4.1.0 -BUILDDIR=../../../mingw cwd=`pwd` -cd ${BUILDDIR} -# Now make builddir absolute -BUILDDIR=`pwd` -cd ${cwd} +cd ${TOPDIR} +# Make TOPDIR absolute +TOPDIR=`pwd` +BUILDDIR=${TOPDIR}/${CROSSTOOLS} -mkdir -p ${BUILDDIR} -mkdir -p ${BUILDDIR}/${TARGET} +cd ${cwd} # Where does the cross-compiler go? # This should be the directory into which your cross-compiler @@ -67,7 +61,9 @@ mkdir -p ${BUILDDIR}/${TARGET} # that only root has write access to, you will need to run this # script as root. -PREFIX=${BUILDDIR}/mingw32 +PREFIX=${BUILDDIR}/${TARGET} +mkdir -p ${BUILDDIR} +mkdir -p ${BUILDDIR}/${TARGET} # Purge anything and everything already in the $PREFIX #(also known as the destination or installation) directory?