Re: [PORTS] QNX4 port

From: "Kardos, Dr(dot) Andreas" <kardos(at)repas-aeg(dot)de>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-ports(at)postgresql(dot)org>
Subject: Re: [PORTS] QNX4 port
Date: 1999-12-21 07:37:21
Message-ID: 000c01bf4b86$37de7550$99301eac@nt-kardos.Dr.repas.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports

>> Above you stated "lowercase $host" but not "lowercase uname -s". $host is
>> "i386-pc-qnx4". Therefore it doesn't make sense to lowercase $host if you
>> want to get the string "qnx". Remember, I have not got the new source yet
to
>> have a look at it. So I can comment only what you have written in the
mail.
>>
>> TEMPLATE=`uname -s | tr A-Z a-z`
>> will not work too because A-Z and a-z must be enclosed in square brackets
on
>> QNX4. So you can use
>> TEMPLATE=`uname -s | tr [A-Z] [a-z]`
>> or
>> TEMPLATE=`uname -s | tr [:upper:] [:lower:]`
>>
>> Andreas Kardos
>
>Yes, you are right. It turns out my change was meaningless. The real
>issue is that if no template is found, configure.in does:
>
> if test "$GUESS"
> then TEMPLATE="$GUESS"
> else
> # Last chance ... maybe uname -s will match an entry.
> TEMPLATE=`uname -s | tr A-Z a-z`
> fi
>
>and tries to guess the platform this way. My guess is that this would
>catch qnx.

As I have written above this unfortunately doesn't work on QNX. It catches
"QNX" but not "qnx". I have tried it. Use
TEMPLATE=`uname -s | tr [A-Z] [a-z]`
or
TEMPLATE=`uname -s | tr [:upper:] [:lower:]`
instead.

Andreas Kardos

For reference:

tr - translate characters (POSIX)

tr [-cs] [-r <filename>] <string1> <string2>
tr -s [-c] [-r <filename>] <string1>
tr -d [-c] [-r <filename>] <string1>
tr -ds [-c] <string1> <string2>
Options:
-c Complement the chars in <string1> with respect to \0-\255.
-d Delete all input characters in <string1>.
-r<file> Translate the named file in place (not using stdin, stdout).
-s Squeeze output resulting from input characters present in
<string1> that were repeated in the input, to single
instances
of the corresponding character in <string2>, or if <string2>
is not specified, to a single instance of the input character
itself.
-ds The combination of -d and -s options causes <string1> to
be used for the set of characters to delete in the input,
and <string2> to be used as the set of characters to squeeze
(in the input -- tr will only delete and squeeze when -ds
is specified, it will not translate).
Where:
<string1> is the 'from' or 'deletion' (-d) set of characters
<string2> is the 'to' set of characters
Note:
The following sequences have special meaning inside <string1> or <string2>:

\octal \ followed by 1-3 octal digits.
\char \ followed by a character represents that character.
[c-c] A range of characters.
[:class:] The set of all chars in class where class is one of {alpha,
upper, lower, digit, xdigit, alnum, space, punct,
print, graph, cntrl, blank}.
[.cs.] Multi-character collating symbol.
[x*n] n repeated occurrences of the character or collating
symbol x. e.g. [[.\\15\\12.]*4] is allowed. When n is not
specified the sequence will be expanded to grow string2 to
the size of string1. [x*n] is not allowed in string1.

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message Kevin Lo 1999-12-21 15:38:43 Announce: PostgreSQL-6.5.3 binaries available for Windows NT
Previous Message Tom Lane 1999-12-21 05:07:07 Re: [HACKERS] SPI Headers -- RPM distribution