public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org>
To: cygwin-cvs@sourceware.org
Subject: [newlib-cygwin] Cygwin: utils: enable -idirafter to fetch Cygwin headers from mingw sources
Date: Wed, 26 May 2021 09:04:37 +0000 (GMT)	[thread overview]
Message-ID: <20210526090437.B2FDF38618B8@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=fd84f6cf5107076cf881f0e0c62cc10b1e160e36

commit fd84f6cf5107076cf881f0e0c62cc10b1e160e36
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed May 26 10:59:03 2021 +0200

    Cygwin: utils: enable -idirafter to fetch Cygwin headers from mingw sources
    
    Get rid of the last dreaded relative paths pointing to the cygwin dir.
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/utils/mingw/Makefile.am | 4 ++--
 winsup/utils/mingw/cygcheck.cc | 6 +++---
 winsup/utils/mingw/testsuite.h | 4 ++--
 winsup/utils/path.cc           | 8 ++++----
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/winsup/utils/mingw/Makefile.am b/winsup/utils/mingw/Makefile.am
index 08a29828f..c06562d9b 100644
--- a/winsup/utils/mingw/Makefile.am
+++ b/winsup/utils/mingw/Makefile.am
@@ -29,7 +29,7 @@ cygcheck_SOURCES = \
 	cygcheck.cc \
 	dump_setup.cc \
 	path.cc
-cygcheck_CPPFLAGS=-I$(srcdir)/..
+cygcheck_CPPFLAGS=-I$(srcdir)/.. -idirafter ${top_srcdir}/cygwin/include
 cygcheck_LDADD = -lz -lwininet -lpsapi -lntdll
 
 cygwin_console_helper_SOURCES = cygwin-console-helper.cc
@@ -47,7 +47,7 @@ noinst_PROGRAMS = path-testsuite
 path_testsuite_SOURCES = \
 	path.cc \
 	testsuite.cc
-path_testsuite_CPPFLAGS=-I$(srcdir)/..
+path_testsuite_CPPFLAGS=-I$(srcdir)/.. -idirafter ${top_srcdir}/cygwin/include
 path_testsuite_CXXFLAGS = -DTESTSUITE
 
 TESTS = path-testsuite
diff --git a/winsup/utils/mingw/cygcheck.cc b/winsup/utils/mingw/cygcheck.cc
index 61fb90ee3..d818a1907 100644
--- a/winsup/utils/mingw/cygcheck.cc
+++ b/winsup/utils/mingw/cygcheck.cc
@@ -20,10 +20,10 @@
 #include "path.h"
 #include "wide_path.h"
 #include <getopt.h>
-#include "../cygwin/include/cygwin/version.h"
-#include "../cygwin/include/sys/cygwin.h"
+#include <cygwin/version.h>
+#include <sys/cygwin.h>
 #define _NOMNTENT_MACROS
-#include "../cygwin/include/mntent.h"
+#include <mntent.h>
 #undef cygwin_internal
 #include "loadlib.h"
 
diff --git a/winsup/utils/mingw/testsuite.h b/winsup/utils/mingw/testsuite.h
index c3d9ad60d..bf2bce204 100644
--- a/winsup/utils/mingw/testsuite.h
+++ b/winsup/utils/mingw/testsuite.h
@@ -7,8 +7,8 @@ Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
 details. */
 
 #include "path.h"
-#include "../cygwin/include/cygwin/bits.h"
-#include "../cygwin/include/sys/mount.h"
+#include <cygwin/bits.h>
+#include <sys/mount.h>
 
 /* This file implements a test harness for the MinGW implementation of
    POSIX path translation in utils/path.cc.  This code is used by strace
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc
index 1a412fc9d..b99467d9e 100644
--- a/winsup/utils/path.cc
+++ b/winsup/utils/path.cc
@@ -20,11 +20,11 @@ details. */
 #include <malloc.h>
 #include <wchar.h>
 #include "path.h"
-#include "../cygwin/include/cygwin/version.h"
-#include "../cygwin/include/cygwin/bits.h"
-#include "../cygwin/include/sys/mount.h"
+#include <cygwin/version.h>
+#include <cygwin/bits.h>
+#include <sys/mount.h>
 #define _NOMNTENT_MACROS
-#include "../cygwin/include/mntent.h"
+#include <mntent.h>
 #ifdef FSTAB_ONLY
 #include <sys/cygwin.h>
 #endif


                 reply	other threads:[~2021-05-26  9:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526090437.B2FDF38618B8@sourceware.org \
    --to=corinna@sourceware.org \
    --cc=cygwin-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).