Mailing List Archived Message #671

From: "Lewis G Rosenthal" <> 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 <>

Hey there...

On 12/31/18 01:20 am, Steven Levine wrote:
In <>, on 12/31/18
    at 12:19 AM, "Lewis G Rosenthal" <> 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

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

i.e., how to easily determine what is using an OS/2
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:

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


Lewis G Rosenthal, CNA, CLP, CLE, CWTS, EA
Rosenthal & Rosenthal, LLC      
visit my IT blog      

Subscribe: Feed, Digest, Index.
Mail to ListMaster