Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jan 2001 13:12:49 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        arch@FreeBSD.org
Cc:        bde@FreeBSD.org
Subject:   Local driver include files.
Message-ID:  <200101222012.f0MKCns65410@aslan.scsiguy.com>

next in thread | raw e-mail | index | archive | help
When writing core driver code to run on several operating systems,
the fact that we use -nostdinc becomes a real pain in the but.
Take a look at sys/dev/aic7xxx/aic7xxx.c:

#ifdef  __linux__
#include "aic7xxx_linux.h"
#include "aic7xxx_inline.h"
#include "aicasm/aicasm_insformat.h"
#endif

#ifdef  __FreeBSD__
#include <dev/aic7xxx/aic7xxx_freebsd.h>
#include <dev/aic7xxx/aic7xxx_inline.h>
#include <dev/aic7xxx/aicasm/aicasm_insformat.h>
#endif

If we provided "-Ipath/to/file/being/compiled" this could
be replaced with:

#include "aic7xxx_osm.h"
#include "aic7xxx_inline.h"
#include "aicasm/aicasm_insformat.h"

This is a much more scalable approach.

I can understand the desire to fully document the path to
an include file, but is this really too much to ask?

--
Justin


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




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