X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Authenticated: #27081556 From: Juan Manuel Guerrero To: djgpp-workers AT delorie DOT com Subject: Re: Difficulty with absolute paths in #include lines Date: Wed, 30 Aug 2006 00:55:35 +0200 User-Agent: KMail/1.8.2 References: <200608300007 DOT 12879 DOT juan DOT guerrero AT gmx DOT de> <200608292220 DOT k7TMK5MS024886 AT envy DOT delorie DOT com> In-Reply-To: <200608292220.k7TMK5MS024886@envy.delorie.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608300055.35739.juan.guerrero@gmx.de> X-Y-GMX-Trusted: 0 Reply-To: djgpp-workers AT delorie DOT com Am Mittwoch, 30. August 2006 00:20 schrieb DJ Delorie: > > > #include > > > > Both versions of the path make the compilation fail. > > What kind of fail? Messages? The above at least should work. Here is the produced output: c:/djgpp/bin/make.exe all-recursive make.exe[1]: Entering directory `d:/pppp/m4-1.4.6' Making all in . make.exe[2]: Entering directory `d:/pppp/m4-1.4.6' make.exe[2]: Nothing to be done for `all-am'. make.exe[2]: Leaving directory `d:/pppp/m4-1.4.6' Making all in examples make.exe[2]: Entering directory `d:/pppp/m4-1.4.6/examples' make.exe[2]: Nothing to be done for `all'. make.exe[2]: Leaving directory `d:/pppp/m4-1.4.6/examples' Making all in lib make.exe[2]: Entering directory `d:/pppp/m4-1.4.6/lib' c:/djgpp/bin/make.exe all-am make.exe[3]: Entering directory `d:/pppp/m4-1.4.6/lib' make.exe[3]: Nothing to be done for `all-am'. make.exe[3]: Leaving directory `d:/pppp/m4-1.4.6/lib' make.exe[2]: Leaving directory `d:/pppp/m4-1.4.6/lib' Making all in src make.exe[2]: Entering directory `d:/pppp/m4-1.4.6/src' gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../lib -I../lib -g -O2 -c debug.c In file included from debug.c:25: ../lib/sys/stat.h:25:51: error: /dev/env/DJDIR/djgpp/include/sys/stat.h: No such file or directory (ENOENT) debug.c: In function 'debug_set_file': debug.c:133: error: storage size of 'stdout_stat' isn't known debug.c:133: error: storage size of 'debug_stat' isn't known make.exe[2]: *** [debug.o] Error 1 make.exe[2]: Leaving directory `d:/pppp/m4-1.4.6/src' make.exe[1]: *** [all-recursive] Error 1 make.exe[1]: Leaving directory `d:/pppp/m4-1.4.6' make.exe: *** [all] Error 2 Here is the generated file ../lib/sys/stat.h: /* Provide a complete sys/stat header file. Copyright (C) 2006 Free Software Foundation, Inc. Written by Eric Blake. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef _gl_SYS_STAT_H #define _gl_SYS_STAT_H /* This file is supposed to be used on platforms where is incomplete. It is intended to provide definitions and prototypes needed by an application. Start with what the system provides. */ #include /* mingw does not support symlinks, therefore it does not have lstat. But without links, stat does just fine. */ #if ! HAVE_LSTAT # define lstat stat #endif /* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. Additionally, it declares _mkdir (and depending on compile flags, an alias mkdir), only in the nonstandard io.h. */ #if ! HAVE_DECL_MKDIR && HAVE_IO_H # include static inline int rpl_mkdir (char const *name, mode_t mode) { return _mkdir (name); } # define mkdir rpl_mkdir #endif #endif /* _gl_SYS_STAT_H */ --------------------------------- EOF ------------------------------------ Later I have tried a simple example to reproduce the error: #include int main(void) { printf("OK"); return 0; } --------------------------------- EOF ------------------------------------ I get the following error message: 1.c:1:48: error: /dev/env/DJDIR/djgpp/include/stdio.h: No such file or directory (ENOENT) 1.c: In function 'main': 1.c:4: warning: implicit declaration of function 'printf' 1.c:4: warning: incompatible implicit declaration of built-in function 'printf' I am using gcc 4.1.1. Am I missing something? Regards, Juan M. Guerrero