Mail Archives: djgpp/1995/06/01/12:35:37

To: klein AT ifsws DOT soziologie DOT uni-jena DOT de
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Porting C-programs
Date: Thu, 1 Jun 1995 07:46:31 PDT
From: Marty Leisner <leisner AT sdsp DOT mc DOT xerox DOT com>

> Hi folks,
> I am monitoring this list for a few days, and I am surprised about the
> quality of the answers. Although my question might not be related to
> DJGPP, maybe someone can help me.
> I wrote a text analysis program in C and want to port it to other
> operating systems like Windows (what insane naughty dull other working
> stuff), Windows/9?, and Unix (Linus and/or DEC Ultrix). Also OS/2 would
> be great. I have been looking for books (Petzold e.g.) and tools to make
> porting effective. My idea is that the code should consist of one source
> where the different operating systems parts are handled with DEFINEs and
> IFs. I heard about ZINC, XVT, and WindowsMaker that support multiple
> GUIs. And of course GNU C is available for many platforms. So what can I
> do, does somewhere reading this know some books, software or anything
> else which helps me? BTW, I am currently using Symantec C/C++ version 7.0
> and starting to learn GNU C.
> thanks in advance -- 

Look at suit (Simple User Interface Toolkit) from the University of Virginia.
I haven't used it yet but it looked impressive...

The way to do things portably is not to use ifdef but use a common set
of functions which exist on all platforms (a la ansi C).  

And do
#include <sys/types.h>

instead of

#include <sys\types.h>

leisner AT sdsp DOT mc DOT xerox DOT com  
Member of the League for Programming Freedom

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019