www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/17/03:08:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Message-Id: <5.2.0.9.1.20100317090729.059a9b10@localhost>
X-Sender: cenedese AT localhost
Date: Wed, 17 Mar 2010 09:08:23 +0100
To: cygwin AT cygwin DOT com
From: Fabian Cenedese <Cenedese AT indel DOT ch>
Subject: Re: Empty include file on samba share
In-Reply-To: <2ca21dcc0901091134l682660fem1ebac27ee6afd69e@mail.gmail.co m>
References: <5 DOT 2 DOT 0 DOT 9 DOT 1 DOT 20090108085658 DOT 01eaf2f0 AT localhost> <5 DOT 2 DOT 0 DOT 9 DOT 1 DOT 20090107170800 DOT 01ebc130 AT localhost> <4964E4BF DOT 6050002 AT cygwin DOT com> <5 DOT 2 DOT 0 DOT 9 DOT 1 DOT 20090108085658 DOT 01eaf2f0 AT localhost>
Mime-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

>> And many other errors coming from unknown items because of seemingly not
>> or badly read include files.
>>
>> However the same line works fine if the project lies on a local drive.
>
>  Have you tried adding "--save-temps" to your CFLAGS so that you can capture
>the pre-processor output and take a look at the corruption?  It might just
>give us a clue.

I'm reviving this old thread in case somebody is looking for a solution.

cpp.exe has a mechanism to ensure that the same file will not be included
multiple times. It identifies "the same file" by remembering the device-id
and inode-number of each already included file. Unfortunately, when the
above problem happens, the inode numbers of different files are equal!
That's why cpp.exe did just not include the second file and also didn't
report any error...

The issue about the non-unique inode numbers is described here:
http://www.cygwin.com/cygwin-ug-net/highlights.html

"On file systems which don't support unique persistent file IDs (FAT, older Samba shares) the inode number for a file is calculated by hashing its full Win32 path. The inode number generated by the stat call always matches the one returned in d_ino of the dirent structure. It is worth noting that the number produced by this method is not guaranteed to be unique. However, we have not found this to be a significant problem because of the low probability of generating a duplicate inode number."

As gcc 3 and 4 don't have this problem they may do additional or
different checks to not include a file twice.

bye  Fabi


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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