apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: Porting APR to QNX4: portability problems.
Date Mon, 29 Jan 2007 17:16:56 GMT
генерал Пурпоз wrote:
> With the official compiler (Watcom C v10.6B) the configuration script
> detects the absence of "long long"s, but still - int64 are all around
> the place. They are not redefined to a smaller size...

It can NOT have a smaller range.  apr_int64_t is a contract that there
are 64 available bits.  If it had 72 bits that wouldn't be the end of
the world.  Is long double or some other type on the watcom compiler

> My problem is that I do not understand what is "root" and what is
> "path" on my platform.
> Consider this:
> QNX4 is the networked OS, each machine is a node, all nodes are
> visible.
> The full path (obtained with the "qnx_fullpath()" call) looks like
> "//node-ID/path/to/some/file", for example on node 2 the full path to
> "ksh" is "//2/bin/ksh". But if one executes "getcwd()" - he will see a
> path like "/home/user".
> So I am all lost and confused: what should I call the "ABS_ROOT", what
> is "root" and what is "path"?
> Do I get it rigth - "bin/ksh" is the path (or is it just "bin/" ?);
> "//2" is ABS_ROOT and "/" is root?
> How should I react on the APR_FILEPATH_TRUENAME flag set?

A fullpath is the absolute path (truename is the canonical form that must
be in the proper case).

A root is something you must not ../ up and around.  So it seems to me that
your root is "//node-ID/".  But obviously on this OS, the local node is the
equivilant of "/".  If you want to use the short node ID on the local paths,
that's fine (those roots are "/").  It's important that the paths are
**consistent**!!!  That will allow folks who test filenames for security
purposes are comparing apples to apples.  If they pass the "//local-ID/foo"
path, they better get back "/foo".

View raw message