Skip site navigation (1) Skip section navigation (2)

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$ (view raw or flat)
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
>> have a look at it. So I can comment only what you have written in the
>> TEMPLATE=`uname -s | tr A-Z a-z`
>> will not work too because A-Z and a-z must be enclosed in square brackets
>> 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, 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]`
TEMPLATE=`uname -s | tr [:upper:] [:lower:]`

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>
 -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
               of the corresponding character in <string2>, or if <string2>
               is not specified, to a single instance of the input character
 -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).
 <string1>     is the 'from' or 'deletion' (-d) set of characters
 <string2>     is the 'to' set of characters
 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.


pgsql-ports by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group