Configure time warning from mozilla/js/src/configure

1 view
Skip to first unread message

ISHIKAWA, Chiaki

unread,
Aug 26, 2010, 6:38:33 PM8/26/10
to
Configure time warning from mozilla/js/src/configure

A warning from mozilla/js/src/configure

Fetched Source code: TB3 for comm-central. But since the problem is
reported under ./mozilla subdirectory, the problem should be
applicable to FireFox as well.

Built Environment: Linux/x86 (Debian GNU/Linux)

During the configure of comm-central, I noticed the following warning.
(I have no idea how long this warning has been around.)

--- quote ---
checking for strtok_r... (cached) yes
checking for truncate64... (cached) yes
/home/ishikawa/TB-3HG/new-src/mozilla/js/src/configure: line 10134:
test: : integer expression expected
checking for res_ninit()... (cached) yes
checking for gnu_get_libc_version()... (cached) yes
-------------

The code in question in ./mozilla/js/src/configure is as follows.
Note that on my machine, MAC_OS_DEPLOYMENT_TARGET is
probably not defined.

10133
10134 if test -z "$MACOS_DEPLOYMENT_TARGET" -o
"$MACOS_DEPLOYMENT_TARGET" -ge "100300"; then
10135
... blahblahblah ...

Thus, the command `test' complained that it is given as argument list,

test -z "" -o "" -ge 100300

and the operand BEFORE -ge is not an integer expression.
(I left "" in the above for explanation, but of course, no quotes are in
the arguments. Each of the arguments is null string.)


Since there is a chance of MACOS_DEPLOYMENT_TARGET
being null string, the condition probably ought to be rewritten to
avoid the evaluation of "" -ge "100300" by `test' command.

For example:

if test -z "$MACOS_DEPLOYMENT_TARGET" || test "$MACOS_DEPLOYMENT_TARGET"
-ge "100300"
then
echo " ... blahblahblah ..."
fi


Note the use of "||" instead of "-o".
"-o" and the following arguments are passed to `test' in the original
if-expression. In the rewritten code, the second invocation of
`test' only occurs if the first `test' check fails (thus guaranteeing
that $MAC_OS_DEPLOYMENT_TARGET is not null string.

TIA

--
int main(void){int j=2010;/*(c)2010 cishikawa. */
char t[] ="<CI> @abcdefghijklmnopqrstuvwxyz.,\n\"";
char *i = "@>qtCIuqivb,gCwe\np@.ietCIuqi\"tqkvv is>dnamz";
while(*i)((j+=(int)strchr(t,*i++)-(int)t),(j%=sizeof t-1),
(putchar(t[j])));return 0;}/*under GPL */

Reply all
Reply to author
Forward
0 new messages