Mailing List gnuports@2rosenthals.com Archived Message #671

From: "Lewis G Rosenthal" <gnuports@2rosenthals.com> Full Headers
Undecoded message
Subject: Re: [GNU Ports] CFLAGS for rpmbuild
Date: Mon, 31 Dec 2018 01:54:31 -0500
To: GNU Ports for eCS Mailing List <gnuports@2rosenthals.com>

Hey there...

On 12/31/18 01:20 am, Steven Levine wrote:
In <list-1710005@2rosenthals.com>, on 12/31/18
    at 12:19 AM, "Lewis G Rosenthal" <gnuports@2rosenthals.com> said:

Hi Lewis,

Still would like some input on the CFLAGS overall, however. I'm a little
concerned about -Zhigh-mem and what I might need to do there concerning
adding os2safe.h,
You could add  os2safe.h by default, but is not going to do anything
useful for your typical *ix app that is written to the C runtime because
the kLIBC itself is already high memory safe.

os2safe.h exists for help porting native OS/2 apps to the kLIBC world
where some of the existing code may call DOS APIs directly.  This is not
likely to happen for the run of the mill app ported from *ix.


This all makes sense. I was wondering how or where I might find a native OS/2 API poking up its head in a bunch of *ix code.

An example of where it does happen is the Apache Web Server.  It's mostly
a kLIBC app, but it links to the Apache Runtime which is basically a
native OS/2 executable.  Unfortunately, os2safe will not help the Apache
Runtime.

This also makes sense, as it's not "all" *ix code.

i.e., how to easily determine what is using an OS/2
API.
The easy way is to check if the sources include os2.h.  For an existing
binary, there's lxlite -c:exemap.


Ah. So, as soon as I see a reference to os2.h, it is logical to assume (as far as that gets us) that at least one OS/2 API may be in use (unless it's just some old cruft which was never pulled out).

The important question is when an app being ported to kLIBC does use an
OS/2 API that is not high memory safe  what is the best method to
remediate the issue.


Yes. My question was prompted by my reading of:

http://trac.netlabs.org/libc/wiki/kOptions

Perhaps that could use some sprucing up, at this point.

Thanks!

--
Lewis
-------------------------------------------------------------
Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC                www.2rosenthals.com
visit my IT blog                www.2rosenthals.net/wordpress
-------------------------------------------------------------


Subscribe: Feed, Digest, Index.
Unsubscribe
Mail to ListMaster