Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 1999 10:12:56 -0500
From:      Dan Nelson <dnelson@emsphone.com>
To:        Pradesh_Chanderpaul@stratus.com
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Developing code for Non-Unix platform
Message-ID:  <19990608101256.A98097@dan.emsphone.com>
In-Reply-To: <1D1A4EF7AD4DD211A80D00A0C9D7DB667E670E@exna1.stratus.com>; from "Pradesh_Chanderpaul@stratus.com" on Tue Jun  8 10:56:51 GMT 1999
References:  <1D1A4EF7AD4DD211A80D00A0C9D7DB667E670E@exna1.stratus.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jun 08), Pradesh_Chanderpaul@stratus.com said:
> I find that using gcc on FreeBSD will compile the "Unix'sms" (ie.
> "system" calls like 'fstat(), signal(), ) without complaint However,
> this {"unixsms") are not available in my destined platform, so I need
> to code around them.
> 
> I found that coding in a DOS/Win32 environment will shut these
> out. Is there a way to do the same in FreeBSD using gcc.

If what you want is a way to warn you when those functions are used,
simply

#define system target_machine_does_not_support_system
#define fstat target_machine_does_not_support_fstat

in a header file (say; hobble.h) and #include "hobble.h" at the top of
all your source files.

Then when you link, the linker will complain if you have used any of
those functions, and you can then go back and rewrite the code.

	-Dan Nelson
	dnelson@emsphone.com


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990608101256.A98097>