Thread: Port for Microsoft Services for Unix (SFU) or SUA

Port for Microsoft Services for Unix (SFU) or SUA

From
Josh Rovero
Date:
Has anyone built postgresql (or just libpq.a) on Windows SFU/SUA?
Would prefer to not reinvent any wheels....

We have a number of Unix/Linux applications that are also compiled
under Microsoft Windows SFU 3.5.  We need to have a SFU-compatible
libpq.a, not a complete install.  The regular Unix/Linux or
Win32 postgresql database runs fine, these apps just need to connect.  

The system has a gnu build environment using the utilites
from Interop Systems at http://www.suacommunity.com/SUA.aspx.
The "complete toolset" has gcc, gmake, etc.

The OS reports itself (uname -a) as:
Interix zonda 3.5 SP-8.0.1969.1 x86 AMD_x86_Family15_Model72_Stepping2

I have run into and fixed a few issues, like INADDR_LOOPBACK not being
defined in the Interix /usr/include/netinet/in.h, adding "dummy" 
entries for src/include/port/interix.h, src/template/interix,
src/backend/port/dynloader/interix.[c|h], etc,

./configure runs, and gcc compiles things fine up until
the first "ar", where I see "ar: illegal option -- g".

Thanks in advance,
-- 
P.J. "Josh" Rovero            Vice President     Sonalysts, Inc.
Email:  rovero@sonalysts.com  www.sonalysts.com  215 Parkway North
Work:   (860)326-3671                            Waterford, CT 06385




Re: Port for Microsoft Services for Unix (SFU) or SUA

From
Magnus Hagander
Date:
2009/12/28 Josh Rovero <rovero@sonalysts.com>:
> Has anyone built postgresql (or just libpq.a) on Windows SFU/SUA?
> Would prefer to not reinvent any wheels....

Not that I know of.


> We have a number of Unix/Linux applications that are also compiled
> under Microsoft Windows SFU 3.5.  We need to have a SFU-compatible
> libpq.a, not a complete install.  The regular Unix/Linux or
> Win32 postgresql database runs fine, these apps just need to connect.

Can't you use the native win32 libpq.dll? IIRC I read somewhere that
it's possible, at least in fairly recent versions, to call regular
Win32 DLLs from an interix process. (But I can't recall where I read
that...)

If that can be done, it's most likely the by far easiest way...


-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/


Re: Port for Microsoft Services for Unix (SFU) or SUA

From
Josh Rovero
Date:
On Tue, 2009-12-29 at 12:42 +0100, Magnus Hagander wrote:
> 2009/12/28 Josh Rovero <rovero@sonalysts.com>:
> > Has anyone built postgresql (or just libpq.a) on Windows SFU/SUA?
> > Would prefer to not reinvent any wheels....
> 
> Not that I know of.
> 
> Can't you use the native win32 libpq.dll? IIRC I read somewhere that
> it's possible, at least in fairly recent versions, to call regular
> Win32 DLLs from an interix process. (But I can't recall where I read
> that...)

The older XP SFU 3.5 applications can't call Win32 dlls directly,
since the SFU and Win32 are segregated personalities atop
the kernel.  The newer SUA (for Vista, Windows 7, etc.) allegedly
allows calls to regular Windows APIs.  Our current customer 
that uses Windows clients doesn't want to switch from XP to 
newer Microsoft OSes just yet..

Thanks, 

-- 
P.J. "Josh" Rovero            Vice President     Sonalysts, Inc.
Email:  rovero@sonalysts.com  www.sonalysts.com  215 Parkway North
Work:   (860)326-3671                            Waterford, CT 06385