From owner-acpi-jp@jp.freebsd.org  Fri Mar 30 04:01:27 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id EAA45918;
	Fri, 30 Mar 2001 04:01:27 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from thalia.fm.intel.com (fmfdns02.fm.intel.com [132.233.247.11])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id EAA45912
	for <acpi-jp@jp.freebsd.org>; Fri, 30 Mar 2001 04:01:26 +0900 (JST)
	(envelope-from andrew.grover@intel.com)
Received: from SMTP (fmsmsxvs02-1.fm.intel.com [132.233.42.202])
	by thalia.fm.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.35 2001/02/12 09:03:45 smothers Exp $) with SMTP id TAA01487
	for <acpi-jp@jp.freebsd.org>; Thu, 29 Mar 2001 19:01:25 GMT
Received: from fmsmsx29.FM.INTEL.COM ([132.233.48.29]) by 132.233.48.202
  (Norton AntiVirus for Internet Email Gateways 1.0) ;
  Thu, 29 Mar 2001 19:01:25 0000 (GMT)
Received: by fmsmsx29.fm.intel.com with Internet Mail Service (5.5.2653.19)
	id <H5ZKBZCP>; Thu, 29 Mar 2001 11:01:23 -0800
Message-ID: <4148FEAAD879D311AC5700A0C969E8905DE7DB@orsmsx35.jf.intel.com>
From: "Grover, Andrew" <andrew.grover@intel.com>
To: "'acpi-jp@jp.freebsd.org'" <acpi-jp@jp.freebsd.org>
Date: Thu, 29 Mar 2001 11:01:17 -0800
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1118
Subject: [acpi-jp 1118] RE: acpica-unix-20010313.tar.gz 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: andrew.grover@intel.com

OK, I'm confused, because I've tried this on a 5.0-CURRENT box (gcc 2.95.3)
in a test program and it worked fine. It also works on Redhat 6.2 (gcc 2.91)
and MSVC's docs explicitly mention that the current directory is the file
containing the #include. Various C books I consulted were not helpful.

Here is what the files for my test program looked like:

c_test/test.c
#include "foo/inc1.h"
#include <stdio.h>

int main(void)
{
	printf("We included %s\n", FOO);

	return 0;
}

c_test/foo/inc1.h
#include "inc2.h"

c_test/foo/inc2.h
#define FOO "inc2.h"

> The "current directory" for an include is the directory holding the 
> source file, not the nested include.  So when you say 
> 
> #include "bar.h"
> 
> in a file you've included with
> 
> #include "platform/foo.h"
> 
> the search for bar.h is *not* going to look in the platform directory.

