Bug 246 - Compiler doesn't define anything to determinate bsd 4.4 origin
Summary: Compiler doesn't define anything to determinate bsd 4.4 origin
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: gnu (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1995-03-16 10:30 UTC by Heikki Suonsivu
Modified: 1995-03-16 10:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heikki Suonsivu 1995-03-16 10:30:01 UTC
bsd or bsd4_4 or anything should be defined by C compiler.  Currently
there is nothing but unix, i386 and FreeBSD, which forces #ifdef
FreeBSD clutter even when the program only needs generic BSD features,
nothing specific to FreeBSD.

gcc version 2.6.2
 /usr/libexec/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=6 -Dunix -Di386 -D__FreeBSD__=2 -D__unix__ -D__i386__ -D__FreeBSD__=2 -D__unix -D__i386 -Asystem(unix) -Asystem(FreeBSD) -Acpu(i386) -Amachine(i386) /usr/users/hsu/hello.c /var/tmp/cc024742.i

Fix: 

Add -D__bsd4_4__ and/or -Dbsd4_4

	It should make its way into 2.1.
How-To-Repeat: 
gcc -v existing-file.c
Comment 1 Andrey A. Chernov freebsd_committer freebsd_triage 1995-03-20 06:31:16 UTC
State Changed
From-To: open->closed

Not a bug but feature