[newlib-cygwin] Cygwin: Reorganize cygwin source dir

Corinna Vinschen corinna@sourceware.org
Sun Aug 7 09:16:01 GMT 2022


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

commit 007e23d6390af11582e55453269b7a51c723d2dd
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Thu Aug 4 16:58:50 2022 +0200

    Cygwin: Reorganize cygwin source dir
    
    Create subdirs and move files accordingly:
    
    - DevDocs:  doc files
    - fhandler: fhandler sources, split fhandler.cc into base.cc and null.cc
    - local_includes: local include files
    - scripts:  scripts called during build
    - sec:      security sources
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/acinclude.m4                                |   4 +-
 winsup/cygwin/{DevNotes => DevDocs/CgfNotes.OLD}   |   0
 winsup/cygwin/{ROADMAP => DevDocs/ROADMAP.OLD}     |   0
 winsup/cygwin/{ => DevDocs}/how-autoload-works.txt |   0
 winsup/cygwin/{ => DevDocs}/how-cygheap-works.txt  |   0
 winsup/cygwin/{ => DevDocs}/how-cygtls-works.txt   |   0
 winsup/cygwin/{ => DevDocs}/how-fhandlers-work.txt |   0
 winsup/cygwin/{ => DevDocs}/how-signals-work.txt   |   0
 winsup/cygwin/{ => DevDocs}/how-spawn-works.txt    |   0
 .../{ => DevDocs}/how-startup-shutdown-works.txt   |   0
 .../cygwin/{ => DevDocs}/how-to-debug-cygwin.txt   |   0
 winsup/cygwin/Makefile.am                          | 117 +++++++++++----------
 winsup/cygwin/{fhandler.cc => fhandler/base.cc}    |  19 +---
 .../clipboard.cc}                                  |   0
 .../{fhandler_console.cc => fhandler/console.cc}   |   0
 .../{fhandler_cygdrive.cc => fhandler/cygdrive.cc} |   0
 winsup/cygwin/{fhandler_dev.cc => fhandler/dev.cc} |   0
 .../{fhandler_dev_fd.cc => fhandler/dev_fd.cc}     |   0
 .../disk_file.cc}                                  |   0
 winsup/cygwin/{fhandler_dsp.cc => fhandler/dsp.cc} |   0
 .../cygwin/{fhandler_fifo.cc => fhandler/fifo.cc}  |   0
 .../{fhandler_floppy.cc => fhandler/floppy.cc}     |   0
 .../{fhandler_mqueue.cc => fhandler/mqueue.cc}     |   0
 .../{fhandler_netdrive.cc => fhandler/netdrive.cc} |   0
 .../{fhandler_nodevice.cc => fhandler/nodevice.cc} |   0
 winsup/cygwin/fhandler/null.cc                     |  35 ++++++
 .../cygwin/{fhandler_pipe.cc => fhandler/pipe.cc}  |   0
 .../cygwin/{fhandler_proc.cc => fhandler/proc.cc}  |   0
 .../{fhandler_process.cc => fhandler/process.cc}   |   0
 .../process_fd.cc}                                 |   0
 .../{fhandler_procnet.cc => fhandler/procnet.cc}   |   0
 .../{fhandler_procsys.cc => fhandler/procsys.cc}   |   0
 .../procsysvipc.cc}                                |   0
 .../{fhandler_random.cc => fhandler/random.cc}     |   0
 winsup/cygwin/{fhandler_raw.cc => fhandler/raw.cc} |   0
 .../{fhandler_registry.cc => fhandler/registry.cc} |   0
 .../{fhandler_serial.cc => fhandler/serial.cc}     |   0
 .../{fhandler_signalfd.cc => fhandler/signalfd.cc} |   0
 .../{fhandler_socket.cc => fhandler/socket.cc}     |   0
 .../socket_inet.cc}                                |   0
 .../socket_local.cc}                               |   0
 .../socket_unix.cc}                                |   0
 .../cygwin/{fhandler_tape.cc => fhandler/tape.cc}  |   0
 .../{fhandler_termios.cc => fhandler/termios.cc}   |   0
 .../{fhandler_timerfd.cc => fhandler/timerfd.cc}   |   0
 winsup/cygwin/{fhandler_tty.cc => fhandler/tty.cc} |   0
 .../{fhandler_virtual.cc => fhandler/virtual.cc}   |   0
 .../{fhandler_windows.cc => fhandler/windows.cc}   |   0
 .../cygwin/{fhandler_zero.cc => fhandler/zero.cc}  |   0
 winsup/cygwin/libc/fnmatch.c                       |   4 -
 winsup/cygwin/{ => local_includes}/child_info.h    |   0
 winsup/cygwin/{ => local_includes}/clock.h         |   0
 winsup/cygwin/{ => local_includes}/collate.h       |   0
 winsup/cygwin/{ => local_includes}/cpuid.h         |   0
 winsup/cygwin/{ => local_includes}/cygerrno.h      |   0
 winsup/cygwin/{ => local_includes}/cygheap.h       |   0
 .../cygwin/{ => local_includes}/cygheap_malloc.h   |   0
 winsup/cygwin/{ => local_includes}/cygmalloc.h     |   0
 winsup/cygwin/{ => local_includes}/cygserver.h     |   0
 winsup/cygwin/{ => local_includes}/cygserver_ipc.h |   0
 winsup/cygwin/{ => local_includes}/cygserver_msg.h |   0
 .../cygwin/{ => local_includes}/cygserver_pwdgrp.h |   0
 winsup/cygwin/{ => local_includes}/cygserver_sem.h |   0
 .../cygwin/{ => local_includes}/cygserver_setpwd.h |   0
 winsup/cygwin/{ => local_includes}/cygserver_shm.h |   0
 winsup/cygwin/{ => local_includes}/cygthread.h     |   0
 winsup/cygwin/{ => local_includes}/cygtls.h        |   0
 winsup/cygwin/{ => local_includes}/cygwait.h       |   0
 winsup/cygwin/{ => local_includes}/cygwin-cxx.h    |   0
 .../cygwin/{ => local_includes}/cygwin_version.h   |   0
 winsup/cygwin/{ => local_includes}/cygxdr.h        |   0
 winsup/cygwin/{ => local_includes}/debug.h         |   0
 winsup/cygwin/{ => local_includes}/devices.h       |   0
 winsup/cygwin/{ => local_includes}/dll_init.h      |   0
 winsup/cygwin/{ => local_includes}/dtable.h        |   0
 winsup/cygwin/{ => local_includes}/environ.h       |   0
 winsup/cygwin/{ => local_includes}/errmap.h        |   0
 winsup/cygwin/{ => local_includes}/exception.h     |   0
 winsup/cygwin/{ => local_includes}/fhandler.h      |   0
 .../cygwin/{ => local_includes}/fhandler_virtual.h |   0
 winsup/cygwin/{ => local_includes}/gcc_seh.h       |   0
 winsup/cygwin/{ => local_includes}/gmon.h          |   0
 winsup/cygwin/{ => local_includes}/heap.h          |   0
 winsup/cygwin/{ => local_includes}/lc_era.h        |   0
 winsup/cygwin/{ => local_includes}/lc_msg.h        |   0
 winsup/cygwin/{ => local_includes}/ldap.h          |   0
 winsup/cygwin/{ => local_includes}/loadavg.h       |   0
 winsup/cygwin/{ => local_includes}/math.h          |   0
 winsup/cygwin/{ => local_includes}/miscfuncs.h     |   0
 winsup/cygwin/{ => local_includes}/mmap_alloc.h    |   0
 winsup/cygwin/{ => local_includes}/mmap_helper.h   |   0
 winsup/cygwin/{ => local_includes}/mount.h         |   0
 winsup/cygwin/{ => local_includes}/mqueue_types.h  |   0
 winsup/cygwin/{ => local_includes}/mtinfo.h        |   0
 winsup/cygwin/{ => local_includes}/nfs.h           |   0
 winsup/cygwin/{ => local_includes}/ntdll.h         |   0
 winsup/cygwin/{ => local_includes}/path.h          |   0
 winsup/cygwin/{ => local_includes}/pathfinder.h    |   0
 winsup/cygwin/{ => local_includes}/perprocess.h    |   0
 winsup/cygwin/{ => local_includes}/pinfo.h         |   0
 winsup/cygwin/{ => local_includes}/posix_timer.h   |   0
 winsup/cygwin/{ => local_includes}/profil.h        |   0
 winsup/cygwin/{ => local_includes}/pwdgrp.h        |   0
 winsup/cygwin/{ => local_includes}/registry.h      |   0
 winsup/cygwin/{ => local_includes}/sec_posixacl.h  |   0
 winsup/cygwin/{ => local_includes}/security.h      |   0
 winsup/cygwin/{ => local_includes}/select.h        |   0
 winsup/cygwin/{ => local_includes}/shared_info.h   |   0
 winsup/cygwin/{ => local_includes}/sigproc.h       |   0
 winsup/cygwin/{ => local_includes}/spinlock.h      |   0
 winsup/cygwin/{ => local_includes}/string.h        |   0
 winsup/cygwin/{ => local_includes}/sync.h          |   0
 winsup/cygwin/{ => local_includes}/thread.h        |   0
 winsup/cygwin/{ => local_includes}/timerfd.h       |   0
 winsup/cygwin/{ => local_includes}/tls_pbuf.h      |   0
 winsup/cygwin/{ => local_includes}/tty.h           |   0
 winsup/cygwin/{ => local_includes}/userinfo.h      |   0
 winsup/cygwin/{ => local_includes}/vstrlist.h      |   0
 winsup/cygwin/{ => local_includes}/wchar.h         |   0
 winsup/cygwin/{ => local_includes}/wincap.h        |   0
 winsup/cygwin/{ => local_includes}/winf.h          |   0
 winsup/cygwin/{ => local_includes}/wininfo.h       |   0
 winsup/cygwin/{ => local_includes}/winlean.h       |   0
 winsup/cygwin/{ => local_includes}/winsup.h        |   0
 winsup/cygwin/{ => scripts}/analyze_sigfe          |   0
 winsup/cygwin/{ => scripts}/cygmagic               |   0
 winsup/cygwin/{ => scripts}/cygwin-shilka          |   0
 winsup/cygwin/{ => scripts}/gendef                 |   0
 winsup/cygwin/{ => scripts}/gendevices             |   0
 winsup/cygwin/{ => scripts}/gentls_offsets         |   0
 winsup/cygwin/{ => scripts}/mkglobals_h            |   0
 winsup/cygwin/{ => scripts}/mkimport               |   0
 winsup/cygwin/{ => scripts}/mkvers.sh              |   0
 winsup/cygwin/{ => scripts}/sortdin                |   0
 winsup/cygwin/{ => scripts}/speclib                |   0
 winsup/cygwin/{ => scripts}/update-copyright       |   0
 winsup/cygwin/{sec_acl.cc => sec/acl.cc}           |   2 +-
 winsup/cygwin/{sec_auth.cc => sec/auth.cc}         |   2 +-
 winsup/cygwin/{security.cc => sec/base.cc}         |   2 +-
 winsup/cygwin/{sec_helper.cc => sec/helper.cc}     |   2 +-
 winsup/cygwin/{sec_posixacl.cc => sec/posixacl.cc} |   2 +-
 winsup/utils/Makefile.am                           |   2 +-
 winsup/utils/mingw/Makefile.am                     |   2 +-
 143 files changed, 108 insertions(+), 85 deletions(-)

diff --git a/winsup/acinclude.m4 b/winsup/acinclude.m4
index ffd15aaaa..aa18cacc8 100644
--- a/winsup/acinclude.m4
+++ b/winsup/acinclude.m4
@@ -16,7 +16,9 @@ if test -z "$newlib_headers"; then
 fi
 newlib_headers="$target_builddir/newlib/targ-include $newlib_headers"
 
-AM_CPPFLAGS="-U_FORTIFY_SOURCE -I${winsup_srcdir}/cygwin -I${target_builddir}/winsup/cygwin"
+AM_CPPFLAGS="-U_FORTIFY_SOURCE"
+AM_CPPFLAGS="${AM_CPPFLAGS} -I${winsup_srcdir}/cygwin/local_includes"
+AM_CPPFLAGS="${AM_CPPFLAGS} -I${target_builddir}/winsup/cygwin"
 AM_CPPFLAGS="${AM_CPPFLAGS} -isystem ${cygwin_headers}"
 for h in ${newlib_headers}; do
     AM_CPPFLAGS="${AM_CPPFLAGS} -isystem $h"
diff --git a/winsup/cygwin/DevNotes b/winsup/cygwin/DevDocs/CgfNotes.OLD
similarity index 100%
rename from winsup/cygwin/DevNotes
rename to winsup/cygwin/DevDocs/CgfNotes.OLD
diff --git a/winsup/cygwin/ROADMAP b/winsup/cygwin/DevDocs/ROADMAP.OLD
similarity index 100%
rename from winsup/cygwin/ROADMAP
rename to winsup/cygwin/DevDocs/ROADMAP.OLD
diff --git a/winsup/cygwin/how-autoload-works.txt b/winsup/cygwin/DevDocs/how-autoload-works.txt
similarity index 100%
rename from winsup/cygwin/how-autoload-works.txt
rename to winsup/cygwin/DevDocs/how-autoload-works.txt
diff --git a/winsup/cygwin/how-cygheap-works.txt b/winsup/cygwin/DevDocs/how-cygheap-works.txt
similarity index 100%
rename from winsup/cygwin/how-cygheap-works.txt
rename to winsup/cygwin/DevDocs/how-cygheap-works.txt
diff --git a/winsup/cygwin/how-cygtls-works.txt b/winsup/cygwin/DevDocs/how-cygtls-works.txt
similarity index 100%
rename from winsup/cygwin/how-cygtls-works.txt
rename to winsup/cygwin/DevDocs/how-cygtls-works.txt
diff --git a/winsup/cygwin/how-fhandlers-work.txt b/winsup/cygwin/DevDocs/how-fhandlers-work.txt
similarity index 100%
rename from winsup/cygwin/how-fhandlers-work.txt
rename to winsup/cygwin/DevDocs/how-fhandlers-work.txt
diff --git a/winsup/cygwin/how-signals-work.txt b/winsup/cygwin/DevDocs/how-signals-work.txt
similarity index 100%
rename from winsup/cygwin/how-signals-work.txt
rename to winsup/cygwin/DevDocs/how-signals-work.txt
diff --git a/winsup/cygwin/how-spawn-works.txt b/winsup/cygwin/DevDocs/how-spawn-works.txt
similarity index 100%
rename from winsup/cygwin/how-spawn-works.txt
rename to winsup/cygwin/DevDocs/how-spawn-works.txt
diff --git a/winsup/cygwin/how-startup-shutdown-works.txt b/winsup/cygwin/DevDocs/how-startup-shutdown-works.txt
similarity index 100%
rename from winsup/cygwin/how-startup-shutdown-works.txt
rename to winsup/cygwin/DevDocs/how-startup-shutdown-works.txt
diff --git a/winsup/cygwin/how-to-debug-cygwin.txt b/winsup/cygwin/DevDocs/how-to-debug-cygwin.txt
similarity index 100%
rename from winsup/cygwin/how-to-debug-cygwin.txt
rename to winsup/cygwin/DevDocs/how-to-debug-cygwin.txt
diff --git a/winsup/cygwin/Makefile.am b/winsup/cygwin/Makefile.am
index fe17a5b1b..367894bb2 100644
--- a/winsup/cygwin/Makefile.am
+++ b/winsup/cygwin/Makefile.am
@@ -68,6 +68,45 @@ LIB_FILES= \
 	lib/premain3.c \
 	lib/pseudo-reloc-dummy.c
 
+FHANDLER_FILES= \
+	fhandler/base.cc \
+	fhandler/clipboard.cc \
+	fhandler/console.cc \
+	fhandler/cygdrive.cc \
+	fhandler/dev.cc \
+	fhandler/dev_fd.cc \
+	fhandler/disk_file.cc \
+	fhandler/dsp.cc \
+	fhandler/fifo.cc \
+	fhandler/floppy.cc \
+	fhandler/mqueue.cc \
+	fhandler/netdrive.cc \
+	fhandler/nodevice.cc \
+	fhandler/null.cc \
+	fhandler/pipe.cc \
+	fhandler/proc.cc \
+	fhandler/process.cc \
+	fhandler/process_fd.cc \
+	fhandler/procnet.cc \
+	fhandler/procsys.cc \
+	fhandler/procsysvipc.cc \
+	fhandler/random.cc \
+	fhandler/raw.cc \
+	fhandler/registry.cc \
+	fhandler/serial.cc \
+	fhandler/signalfd.cc \
+	fhandler/socket.cc \
+	fhandler/socket_inet.cc \
+	fhandler/socket_local.cc \
+	fhandler/socket_unix.cc \
+	fhandler/tape.cc \
+	fhandler/termios.cc \
+	fhandler/timerfd.cc \
+	fhandler/tty.cc \
+	fhandler/virtual.cc \
+	fhandler/windows.cc \
+	fhandler/zero.cc
+
 LIBC_FILES= \
 	libc/arc4random_stir.c \
 	libc/base64.c \
@@ -196,6 +235,13 @@ REGEX_FILES = \
 	regex/regexec.c \
 	regex/regfree.c
 
+SEC_FILES= \
+	sec/acl.cc \
+	sec/auth.cc \
+	sec/base.cc \
+	sec/helper.cc \
+	sec/posixacl.cc
+
 TZCODE_FILES= \
 	tzcode/localtime_wrapper.c
 
@@ -226,42 +272,6 @@ DLL_FILES= \
 	external.cc \
 	fcntl.cc \
 	fenv.c \
-	fhandler.cc \
-	fhandler_clipboard.cc \
-	fhandler_console.cc \
-	fhandler_cygdrive.cc \
-	fhandler_dev.cc \
-	fhandler_dev_fd.cc \
-	fhandler_disk_file.cc \
-	fhandler_dsp.cc \
-	fhandler_fifo.cc \
-	fhandler_floppy.cc \
-	fhandler_mqueue.cc \
-	fhandler_netdrive.cc \
-	fhandler_nodevice.cc \
-	fhandler_pipe.cc \
-	fhandler_proc.cc \
-	fhandler_process.cc \
-	fhandler_process_fd.cc \
-	fhandler_procnet.cc \
-	fhandler_procsys.cc \
-	fhandler_procsysvipc.cc \
-	fhandler_random.cc \
-	fhandler_raw.cc \
-	fhandler_registry.cc \
-	fhandler_serial.cc \
-	fhandler_signalfd.cc \
-	fhandler_socket.cc \
-	fhandler_socket_inet.cc \
-	fhandler_socket_local.cc \
-	fhandler_socket_unix.cc \
-	fhandler_tape.cc \
-	fhandler_termios.cc \
-	fhandler_timerfd.cc \
-	fhandler_tty.cc \
-	fhandler_virtual.cc \
-	fhandler_windows.cc \
-	fhandler_zero.cc \
 	flock.cc \
 	fork.cc \
 	forkable.cc \
@@ -305,11 +315,6 @@ DLL_FILES= \
 	resource.cc \
 	scandir.cc \
 	sched.cc \
-	sec_acl.cc \
-	sec_auth.cc \
-	sec_helper.cc \
-	sec_posixacl.cc \
-	security.cc \
 	select.cc \
 	sem.cc \
 	setlsapwd.cc \
@@ -359,8 +364,10 @@ libdll_a_SOURCES= \
 	$(DLL_FILES) \
 	$(REGEX_FILES) \
 	$(MALLOC_FILES) \
+	$(FHANDLER_FILES) \
 	$(LIBC_FILES) \
 	$(MATH_FILES) \
+	$(SEC_FILES) \
 	$(TZCODE_FILES) \
 	$(GENERATED_FILES)
 
@@ -368,13 +375,13 @@ libdll_a_SOURCES= \
 # generated sources
 #
 
-shared_info_magic.h: cygmagic shared_info.h
-	$(AM_V_GEN)$(srcdir)/cygmagic $@ "$(CC) $(INCLUDES) $(CPPFLAGS) -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
+shared_info_magic.h: scripts/cygmagic local_includes/shared_info.h
+	$(AM_V_GEN)$(srcdir)/scripts/cygmagic $@ "$(CC) $(INCLUDES) $(CPPFLAGS) -E -x c++" $(word 2,$^) SHARED_MAGIC 'class shared_info' USER_MAGIC 'class user_info'
 
-child_info_magic.h: cygmagic child_info.h
-	$(AM_V_GEN)$(srcdir)/cygmagic $@ "$(CC) $(INCLUDES) $(CPPFLAGS) -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
+child_info_magic.h: scripts/cygmagic local_includes/child_info.h
+	$(AM_V_GEN)$(srcdir)/scripts/cygmagic $@ "$(CC) $(INCLUDES) $(CPPFLAGS) -E -x c++" $(word 2,$^) CHILD_INFO_MAGIC 'class child_info'
 
-globals.h: mkglobals_h globals.cc
+globals.h: scripts/mkglobals_h globals.cc
 	$(AM_V_GEN)$^ > $@
 
 localtime.patched.c: tzcode/localtime.c tzcode/localtime.c.patch
@@ -382,10 +389,10 @@ localtime.patched.c: tzcode/localtime.c tzcode/localtime.c.patch
 		    $(srcdir)/tzcode/localtime.c \
 		    $(srcdir)/tzcode/localtime.c.patch
 
-$(srcdir)/devices.cc: gendevices devices.in devices.h
+$(srcdir)/devices.cc: scripts/gendevices devices.in local_includes/devices.h
 	$(wordlist 1,2,$^) $@
 
-tlsoffsets: gentls_offsets cygtls.h
+tlsoffsets: scripts/gentls_offsets local_includes/cygtls.h
 	$(AM_V_GEN)CXXCOMPILE="$(CXXCOMPILE)" $^ $@
 
 BUILT_SOURCES = \
@@ -402,7 +409,7 @@ src_files := $(foreach dir,$(dirs),$(find_src_files))
 
 # mkvers.sh creates version.cc in the first place, winver.o always
 # second, so version.cc is always older than winver.o
-version.cc: mkvers.sh include/cygwin/version.h winver.rc $(src_files)
+version.cc: scripts/mkvers.sh include/cygwin/version.h winver.rc $(src_files)
 	@echo "Making version.cc and winver.o";\
 	export CC="$(CC)";\
 	/bin/sh $(word 1,$^) $(word 2,$^) $(word 3,$^) $(WINDRES) $(CFLAGS)
@@ -486,7 +493,7 @@ localtime_wrapper_CFLAGS=-I$(srcdir)/tzcode -fwrapv
 # required since gcc 9.x
 exec_CFLAGS=-fno-builtin-execve
 
-fhandler_proc_CFLAGS=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\"" \
+proc_CFLAGS=-DUSERNAME="\"$(USER)\"" -DHOSTNAME="\"$(HOSTNAME)\"" \
 		     -DGCC_VERSION="\"`$(CC) -v 2>&1 | tail -n 1`\""
 
 dtable_CFLAGS=-fcheck-new
@@ -608,8 +615,8 @@ $(NEW_DLL_NAME): $(PRE_DLL_NAME) $(DBG_DLL_NAME)
 # cygwin import library
 toolopts=--cpu=@target_cpu@ --ar=@AR@ --as=@AS@ --nm=@NM@ --objcopy=@OBJCOPY@
 
-$(DEF_FILE): gendef $(DIN_FILE) common.din
-	$(AM_V_GEN)$(srcdir)/gendef --cpu=@target_cpu@ --output-def=$(DEF_FILE) $(srcdir)/$(DIN_FILE) $(srcdir)/common.din
+$(DEF_FILE): scripts/gendef $(DIN_FILE) common.din
+	$(AM_V_GEN)$(srcdir)/scripts/gendef --cpu=@target_cpu@ --output-def=$(DEF_FILE) $(srcdir)/$(DIN_FILE) $(srcdir)/common.din
 
 sigfe.s: $(DEF_FILE) tlsoffsets
 	@[ -s $@ ] || \
@@ -618,7 +625,7 @@ sigfe.s: $(DEF_FILE) tlsoffsets
 
 LIBCOS=$(addsuffix .o,$(basename $(LIB_FILES)))
 $(LIB_NAME): $(DEF_FILE) $(LIBCOS) | $(NEW_DLL_NAME)
-	$(AM_V_GEN)$(srcdir)/mkimport $(toolopts) $(NEW_FUNCTIONS) $@ cygdll.a $(wordlist 2,99,$^)
+	$(AM_V_GEN)$(srcdir)/scripts/mkimport $(toolopts) $(NEW_FUNCTIONS) $@ cygdll.a $(wordlist 2,99,$^)
 
 # cygwin import library used by testsuite
 $(TEST_LIB_NAME): $(LIB_NAME)
@@ -627,7 +634,7 @@ $(TEST_LIB_NAME): $(LIB_NAME)
 # sublibs
 # import libraries for some subset of symbols indicated by given objects
 speclib=\
-	$(srcdir)/speclib $(toolopts) \
+	$(srcdir)/scripts/speclib $(toolopts) \
 	--exclude='cygwin' \
 	--exclude='(?i:dll)' \
 	--exclude='reloc' \
@@ -656,7 +663,7 @@ libresolv.a: $(LIB_NAME) libc/minires.o
 librt.a: $(LIB_NAME) posix_ipc.o
 	$(AM_V_GEN)$(speclib) $^ $(@F)
 
-libacl.a: $(LIB_NAME) sec_posixacl.o
+libacl.a: $(LIB_NAME) sec/posixacl.o
 	$(AM_V_GEN)$(speclib) $^ $(@F)
 
 libssp.a: $(LIB_NAME) $(wildcard $(newlib_build)/libc/ssp/*.o)
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler/base.cc
similarity index 98%
rename from winsup/cygwin/fhandler.cc
rename to winsup/cygwin/fhandler/base.cc
index 72d35391f..b2738cf20 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler/base.cc
@@ -1,4 +1,4 @@
-/* fhandler.cc.  See console.cc for fhandler_console functions.
+/* base.cc.  Base functions, inherited by all fhandlers.
 
 This file is part of Cygwin.
 
@@ -1488,23 +1488,6 @@ fhandler_base::~fhandler_base ()
     free (ra.rabuf);
 }
 
-/**********************************************************************/
-/* /dev/null */
-
-fhandler_dev_null::fhandler_dev_null () :
-	fhandler_base ()
-{
-}
-
-ssize_t
-fhandler_dev_null::write (const void *ptr, size_t len)
-{
-  /* Shortcut.  This also fixes a problem with the NUL device on x86_64:
-     If you write > 4 GB in a single attempt, the bytes written returned
-     from by is numBytes & 0xffffffff. */
-  return len;
-}
-
 void
 fhandler_base::set_no_inheritance (HANDLE &h, bool not_inheriting)
 {
diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler/clipboard.cc
similarity index 100%
rename from winsup/cygwin/fhandler_clipboard.cc
rename to winsup/cygwin/fhandler/clipboard.cc
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler/console.cc
similarity index 100%
rename from winsup/cygwin/fhandler_console.cc
rename to winsup/cygwin/fhandler/console.cc
diff --git a/winsup/cygwin/fhandler_cygdrive.cc b/winsup/cygwin/fhandler/cygdrive.cc
similarity index 100%
rename from winsup/cygwin/fhandler_cygdrive.cc
rename to winsup/cygwin/fhandler/cygdrive.cc
diff --git a/winsup/cygwin/fhandler_dev.cc b/winsup/cygwin/fhandler/dev.cc
similarity index 100%
rename from winsup/cygwin/fhandler_dev.cc
rename to winsup/cygwin/fhandler/dev.cc
diff --git a/winsup/cygwin/fhandler_dev_fd.cc b/winsup/cygwin/fhandler/dev_fd.cc
similarity index 100%
rename from winsup/cygwin/fhandler_dev_fd.cc
rename to winsup/cygwin/fhandler/dev_fd.cc
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler/disk_file.cc
similarity index 100%
rename from winsup/cygwin/fhandler_disk_file.cc
rename to winsup/cygwin/fhandler/disk_file.cc
diff --git a/winsup/cygwin/fhandler_dsp.cc b/winsup/cygwin/fhandler/dsp.cc
similarity index 100%
rename from winsup/cygwin/fhandler_dsp.cc
rename to winsup/cygwin/fhandler/dsp.cc
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler/fifo.cc
similarity index 100%
rename from winsup/cygwin/fhandler_fifo.cc
rename to winsup/cygwin/fhandler/fifo.cc
diff --git a/winsup/cygwin/fhandler_floppy.cc b/winsup/cygwin/fhandler/floppy.cc
similarity index 100%
rename from winsup/cygwin/fhandler_floppy.cc
rename to winsup/cygwin/fhandler/floppy.cc
diff --git a/winsup/cygwin/fhandler_mqueue.cc b/winsup/cygwin/fhandler/mqueue.cc
similarity index 100%
rename from winsup/cygwin/fhandler_mqueue.cc
rename to winsup/cygwin/fhandler/mqueue.cc
diff --git a/winsup/cygwin/fhandler_netdrive.cc b/winsup/cygwin/fhandler/netdrive.cc
similarity index 100%
rename from winsup/cygwin/fhandler_netdrive.cc
rename to winsup/cygwin/fhandler/netdrive.cc
diff --git a/winsup/cygwin/fhandler_nodevice.cc b/winsup/cygwin/fhandler/nodevice.cc
similarity index 100%
rename from winsup/cygwin/fhandler_nodevice.cc
rename to winsup/cygwin/fhandler/nodevice.cc
diff --git a/winsup/cygwin/fhandler/null.cc b/winsup/cygwin/fhandler/null.cc
new file mode 100644
index 000000000..e4dec35e1
--- /dev/null
+++ b/winsup/cygwin/fhandler/null.cc
@@ -0,0 +1,35 @@
+/* null.cc.  /dev/null specifics.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#include "winsup.h"
+#include <unistd.h>
+#include <stdlib.h>
+#include <sys/uio.h>
+#include <cygwin/acl.h>
+#include <sys/param.h>
+#include "cygerrno.h"
+#include "perprocess.h"
+#include "security.h"
+#include "cygwin/version.h"
+#include "path.h"
+#include "fhandler.h"
+
+fhandler_dev_null::fhandler_dev_null () :
+	fhandler_base ()
+{
+}
+
+ssize_t
+fhandler_dev_null::write (const void *ptr, size_t len)
+{
+  /* Shortcut.  This also fixes a problem with the NUL device on x86_64:
+     If you write > 4 GB in a single attempt, the bytes written returned
+     from by is numBytes & 0xffffffff. */
+  return len;
+}
+
diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler/pipe.cc
similarity index 100%
rename from winsup/cygwin/fhandler_pipe.cc
rename to winsup/cygwin/fhandler/pipe.cc
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler/proc.cc
similarity index 100%
rename from winsup/cygwin/fhandler_proc.cc
rename to winsup/cygwin/fhandler/proc.cc
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler/process.cc
similarity index 100%
rename from winsup/cygwin/fhandler_process.cc
rename to winsup/cygwin/fhandler/process.cc
diff --git a/winsup/cygwin/fhandler_process_fd.cc b/winsup/cygwin/fhandler/process_fd.cc
similarity index 100%
rename from winsup/cygwin/fhandler_process_fd.cc
rename to winsup/cygwin/fhandler/process_fd.cc
diff --git a/winsup/cygwin/fhandler_procnet.cc b/winsup/cygwin/fhandler/procnet.cc
similarity index 100%
rename from winsup/cygwin/fhandler_procnet.cc
rename to winsup/cygwin/fhandler/procnet.cc
diff --git a/winsup/cygwin/fhandler_procsys.cc b/winsup/cygwin/fhandler/procsys.cc
similarity index 100%
rename from winsup/cygwin/fhandler_procsys.cc
rename to winsup/cygwin/fhandler/procsys.cc
diff --git a/winsup/cygwin/fhandler_procsysvipc.cc b/winsup/cygwin/fhandler/procsysvipc.cc
similarity index 100%
rename from winsup/cygwin/fhandler_procsysvipc.cc
rename to winsup/cygwin/fhandler/procsysvipc.cc
diff --git a/winsup/cygwin/fhandler_random.cc b/winsup/cygwin/fhandler/random.cc
similarity index 100%
rename from winsup/cygwin/fhandler_random.cc
rename to winsup/cygwin/fhandler/random.cc
diff --git a/winsup/cygwin/fhandler_raw.cc b/winsup/cygwin/fhandler/raw.cc
similarity index 100%
rename from winsup/cygwin/fhandler_raw.cc
rename to winsup/cygwin/fhandler/raw.cc
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler/registry.cc
similarity index 100%
rename from winsup/cygwin/fhandler_registry.cc
rename to winsup/cygwin/fhandler/registry.cc
diff --git a/winsup/cygwin/fhandler_serial.cc b/winsup/cygwin/fhandler/serial.cc
similarity index 100%
rename from winsup/cygwin/fhandler_serial.cc
rename to winsup/cygwin/fhandler/serial.cc
diff --git a/winsup/cygwin/fhandler_signalfd.cc b/winsup/cygwin/fhandler/signalfd.cc
similarity index 100%
rename from winsup/cygwin/fhandler_signalfd.cc
rename to winsup/cygwin/fhandler/signalfd.cc
diff --git a/winsup/cygwin/fhandler_socket.cc b/winsup/cygwin/fhandler/socket.cc
similarity index 100%
rename from winsup/cygwin/fhandler_socket.cc
rename to winsup/cygwin/fhandler/socket.cc
diff --git a/winsup/cygwin/fhandler_socket_inet.cc b/winsup/cygwin/fhandler/socket_inet.cc
similarity index 100%
rename from winsup/cygwin/fhandler_socket_inet.cc
rename to winsup/cygwin/fhandler/socket_inet.cc
diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler/socket_local.cc
similarity index 100%
rename from winsup/cygwin/fhandler_socket_local.cc
rename to winsup/cygwin/fhandler/socket_local.cc
diff --git a/winsup/cygwin/fhandler_socket_unix.cc b/winsup/cygwin/fhandler/socket_unix.cc
similarity index 100%
rename from winsup/cygwin/fhandler_socket_unix.cc
rename to winsup/cygwin/fhandler/socket_unix.cc
diff --git a/winsup/cygwin/fhandler_tape.cc b/winsup/cygwin/fhandler/tape.cc
similarity index 100%
rename from winsup/cygwin/fhandler_tape.cc
rename to winsup/cygwin/fhandler/tape.cc
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler/termios.cc
similarity index 100%
rename from winsup/cygwin/fhandler_termios.cc
rename to winsup/cygwin/fhandler/termios.cc
diff --git a/winsup/cygwin/fhandler_timerfd.cc b/winsup/cygwin/fhandler/timerfd.cc
similarity index 100%
rename from winsup/cygwin/fhandler_timerfd.cc
rename to winsup/cygwin/fhandler/timerfd.cc
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler/tty.cc
similarity index 100%
rename from winsup/cygwin/fhandler_tty.cc
rename to winsup/cygwin/fhandler/tty.cc
diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler/virtual.cc
similarity index 100%
rename from winsup/cygwin/fhandler_virtual.cc
rename to winsup/cygwin/fhandler/virtual.cc
diff --git a/winsup/cygwin/fhandler_windows.cc b/winsup/cygwin/fhandler/windows.cc
similarity index 100%
rename from winsup/cygwin/fhandler_windows.cc
rename to winsup/cygwin/fhandler/windows.cc
diff --git a/winsup/cygwin/fhandler_zero.cc b/winsup/cygwin/fhandler/zero.cc
similarity index 100%
rename from winsup/cygwin/fhandler_zero.cc
rename to winsup/cygwin/fhandler/zero.cc
diff --git a/winsup/cygwin/libc/fnmatch.c b/winsup/cygwin/libc/fnmatch.c
index 6655bca88..410254ab8 100644
--- a/winsup/cygwin/libc/fnmatch.c
+++ b/winsup/cygwin/libc/fnmatch.c
@@ -64,11 +64,7 @@ __FBSDID("$FreeBSD: head/lib/libc/gen/fnmatch.c 288309 2015-09-27 12:52:18Z jill
 #include <wchar.h>
 #include <wctype.h>
 
-#ifdef __CYGWIN__
-#include "../collate.h"
-#else
 #include "collate.h"
-#endif
 
 #define	EOS	'\0'
 
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/local_includes/child_info.h
similarity index 100%
rename from winsup/cygwin/child_info.h
rename to winsup/cygwin/local_includes/child_info.h
diff --git a/winsup/cygwin/clock.h b/winsup/cygwin/local_includes/clock.h
similarity index 100%
rename from winsup/cygwin/clock.h
rename to winsup/cygwin/local_includes/clock.h
diff --git a/winsup/cygwin/collate.h b/winsup/cygwin/local_includes/collate.h
similarity index 100%
rename from winsup/cygwin/collate.h
rename to winsup/cygwin/local_includes/collate.h
diff --git a/winsup/cygwin/cpuid.h b/winsup/cygwin/local_includes/cpuid.h
similarity index 100%
rename from winsup/cygwin/cpuid.h
rename to winsup/cygwin/local_includes/cpuid.h
diff --git a/winsup/cygwin/cygerrno.h b/winsup/cygwin/local_includes/cygerrno.h
similarity index 100%
rename from winsup/cygwin/cygerrno.h
rename to winsup/cygwin/local_includes/cygerrno.h
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/local_includes/cygheap.h
similarity index 100%
rename from winsup/cygwin/cygheap.h
rename to winsup/cygwin/local_includes/cygheap.h
diff --git a/winsup/cygwin/cygheap_malloc.h b/winsup/cygwin/local_includes/cygheap_malloc.h
similarity index 100%
rename from winsup/cygwin/cygheap_malloc.h
rename to winsup/cygwin/local_includes/cygheap_malloc.h
diff --git a/winsup/cygwin/cygmalloc.h b/winsup/cygwin/local_includes/cygmalloc.h
similarity index 100%
rename from winsup/cygwin/cygmalloc.h
rename to winsup/cygwin/local_includes/cygmalloc.h
diff --git a/winsup/cygwin/cygserver.h b/winsup/cygwin/local_includes/cygserver.h
similarity index 100%
rename from winsup/cygwin/cygserver.h
rename to winsup/cygwin/local_includes/cygserver.h
diff --git a/winsup/cygwin/cygserver_ipc.h b/winsup/cygwin/local_includes/cygserver_ipc.h
similarity index 100%
rename from winsup/cygwin/cygserver_ipc.h
rename to winsup/cygwin/local_includes/cygserver_ipc.h
diff --git a/winsup/cygwin/cygserver_msg.h b/winsup/cygwin/local_includes/cygserver_msg.h
similarity index 100%
rename from winsup/cygwin/cygserver_msg.h
rename to winsup/cygwin/local_includes/cygserver_msg.h
diff --git a/winsup/cygwin/cygserver_pwdgrp.h b/winsup/cygwin/local_includes/cygserver_pwdgrp.h
similarity index 100%
rename from winsup/cygwin/cygserver_pwdgrp.h
rename to winsup/cygwin/local_includes/cygserver_pwdgrp.h
diff --git a/winsup/cygwin/cygserver_sem.h b/winsup/cygwin/local_includes/cygserver_sem.h
similarity index 100%
rename from winsup/cygwin/cygserver_sem.h
rename to winsup/cygwin/local_includes/cygserver_sem.h
diff --git a/winsup/cygwin/cygserver_setpwd.h b/winsup/cygwin/local_includes/cygserver_setpwd.h
similarity index 100%
rename from winsup/cygwin/cygserver_setpwd.h
rename to winsup/cygwin/local_includes/cygserver_setpwd.h
diff --git a/winsup/cygwin/cygserver_shm.h b/winsup/cygwin/local_includes/cygserver_shm.h
similarity index 100%
rename from winsup/cygwin/cygserver_shm.h
rename to winsup/cygwin/local_includes/cygserver_shm.h
diff --git a/winsup/cygwin/cygthread.h b/winsup/cygwin/local_includes/cygthread.h
similarity index 100%
rename from winsup/cygwin/cygthread.h
rename to winsup/cygwin/local_includes/cygthread.h
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/local_includes/cygtls.h
similarity index 100%
rename from winsup/cygwin/cygtls.h
rename to winsup/cygwin/local_includes/cygtls.h
diff --git a/winsup/cygwin/cygwait.h b/winsup/cygwin/local_includes/cygwait.h
similarity index 100%
rename from winsup/cygwin/cygwait.h
rename to winsup/cygwin/local_includes/cygwait.h
diff --git a/winsup/cygwin/cygwin-cxx.h b/winsup/cygwin/local_includes/cygwin-cxx.h
similarity index 100%
rename from winsup/cygwin/cygwin-cxx.h
rename to winsup/cygwin/local_includes/cygwin-cxx.h
diff --git a/winsup/cygwin/cygwin_version.h b/winsup/cygwin/local_includes/cygwin_version.h
similarity index 100%
rename from winsup/cygwin/cygwin_version.h
rename to winsup/cygwin/local_includes/cygwin_version.h
diff --git a/winsup/cygwin/cygxdr.h b/winsup/cygwin/local_includes/cygxdr.h
similarity index 100%
rename from winsup/cygwin/cygxdr.h
rename to winsup/cygwin/local_includes/cygxdr.h
diff --git a/winsup/cygwin/debug.h b/winsup/cygwin/local_includes/debug.h
similarity index 100%
rename from winsup/cygwin/debug.h
rename to winsup/cygwin/local_includes/debug.h
diff --git a/winsup/cygwin/devices.h b/winsup/cygwin/local_includes/devices.h
similarity index 100%
rename from winsup/cygwin/devices.h
rename to winsup/cygwin/local_includes/devices.h
diff --git a/winsup/cygwin/dll_init.h b/winsup/cygwin/local_includes/dll_init.h
similarity index 100%
rename from winsup/cygwin/dll_init.h
rename to winsup/cygwin/local_includes/dll_init.h
diff --git a/winsup/cygwin/dtable.h b/winsup/cygwin/local_includes/dtable.h
similarity index 100%
rename from winsup/cygwin/dtable.h
rename to winsup/cygwin/local_includes/dtable.h
diff --git a/winsup/cygwin/environ.h b/winsup/cygwin/local_includes/environ.h
similarity index 100%
rename from winsup/cygwin/environ.h
rename to winsup/cygwin/local_includes/environ.h
diff --git a/winsup/cygwin/errmap.h b/winsup/cygwin/local_includes/errmap.h
similarity index 100%
rename from winsup/cygwin/errmap.h
rename to winsup/cygwin/local_includes/errmap.h
diff --git a/winsup/cygwin/exception.h b/winsup/cygwin/local_includes/exception.h
similarity index 100%
rename from winsup/cygwin/exception.h
rename to winsup/cygwin/local_includes/exception.h
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/local_includes/fhandler.h
similarity index 100%
rename from winsup/cygwin/fhandler.h
rename to winsup/cygwin/local_includes/fhandler.h
diff --git a/winsup/cygwin/fhandler_virtual.h b/winsup/cygwin/local_includes/fhandler_virtual.h
similarity index 100%
rename from winsup/cygwin/fhandler_virtual.h
rename to winsup/cygwin/local_includes/fhandler_virtual.h
diff --git a/winsup/cygwin/gcc_seh.h b/winsup/cygwin/local_includes/gcc_seh.h
similarity index 100%
rename from winsup/cygwin/gcc_seh.h
rename to winsup/cygwin/local_includes/gcc_seh.h
diff --git a/winsup/cygwin/gmon.h b/winsup/cygwin/local_includes/gmon.h
similarity index 100%
rename from winsup/cygwin/gmon.h
rename to winsup/cygwin/local_includes/gmon.h
diff --git a/winsup/cygwin/heap.h b/winsup/cygwin/local_includes/heap.h
similarity index 100%
rename from winsup/cygwin/heap.h
rename to winsup/cygwin/local_includes/heap.h
diff --git a/winsup/cygwin/lc_era.h b/winsup/cygwin/local_includes/lc_era.h
similarity index 100%
rename from winsup/cygwin/lc_era.h
rename to winsup/cygwin/local_includes/lc_era.h
diff --git a/winsup/cygwin/lc_msg.h b/winsup/cygwin/local_includes/lc_msg.h
similarity index 100%
rename from winsup/cygwin/lc_msg.h
rename to winsup/cygwin/local_includes/lc_msg.h
diff --git a/winsup/cygwin/ldap.h b/winsup/cygwin/local_includes/ldap.h
similarity index 100%
rename from winsup/cygwin/ldap.h
rename to winsup/cygwin/local_includes/ldap.h
diff --git a/winsup/cygwin/loadavg.h b/winsup/cygwin/local_includes/loadavg.h
similarity index 100%
rename from winsup/cygwin/loadavg.h
rename to winsup/cygwin/local_includes/loadavg.h
diff --git a/winsup/cygwin/math.h b/winsup/cygwin/local_includes/math.h
similarity index 100%
rename from winsup/cygwin/math.h
rename to winsup/cygwin/local_includes/math.h
diff --git a/winsup/cygwin/miscfuncs.h b/winsup/cygwin/local_includes/miscfuncs.h
similarity index 100%
rename from winsup/cygwin/miscfuncs.h
rename to winsup/cygwin/local_includes/miscfuncs.h
diff --git a/winsup/cygwin/mmap_alloc.h b/winsup/cygwin/local_includes/mmap_alloc.h
similarity index 100%
rename from winsup/cygwin/mmap_alloc.h
rename to winsup/cygwin/local_includes/mmap_alloc.h
diff --git a/winsup/cygwin/mmap_helper.h b/winsup/cygwin/local_includes/mmap_helper.h
similarity index 100%
rename from winsup/cygwin/mmap_helper.h
rename to winsup/cygwin/local_includes/mmap_helper.h
diff --git a/winsup/cygwin/mount.h b/winsup/cygwin/local_includes/mount.h
similarity index 100%
rename from winsup/cygwin/mount.h
rename to winsup/cygwin/local_includes/mount.h
diff --git a/winsup/cygwin/mqueue_types.h b/winsup/cygwin/local_includes/mqueue_types.h
similarity index 100%
rename from winsup/cygwin/mqueue_types.h
rename to winsup/cygwin/local_includes/mqueue_types.h
diff --git a/winsup/cygwin/mtinfo.h b/winsup/cygwin/local_includes/mtinfo.h
similarity index 100%
rename from winsup/cygwin/mtinfo.h
rename to winsup/cygwin/local_includes/mtinfo.h
diff --git a/winsup/cygwin/nfs.h b/winsup/cygwin/local_includes/nfs.h
similarity index 100%
rename from winsup/cygwin/nfs.h
rename to winsup/cygwin/local_includes/nfs.h
diff --git a/winsup/cygwin/ntdll.h b/winsup/cygwin/local_includes/ntdll.h
similarity index 100%
rename from winsup/cygwin/ntdll.h
rename to winsup/cygwin/local_includes/ntdll.h
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/local_includes/path.h
similarity index 100%
rename from winsup/cygwin/path.h
rename to winsup/cygwin/local_includes/path.h
diff --git a/winsup/cygwin/pathfinder.h b/winsup/cygwin/local_includes/pathfinder.h
similarity index 100%
rename from winsup/cygwin/pathfinder.h
rename to winsup/cygwin/local_includes/pathfinder.h
diff --git a/winsup/cygwin/perprocess.h b/winsup/cygwin/local_includes/perprocess.h
similarity index 100%
rename from winsup/cygwin/perprocess.h
rename to winsup/cygwin/local_includes/perprocess.h
diff --git a/winsup/cygwin/pinfo.h b/winsup/cygwin/local_includes/pinfo.h
similarity index 100%
rename from winsup/cygwin/pinfo.h
rename to winsup/cygwin/local_includes/pinfo.h
diff --git a/winsup/cygwin/posix_timer.h b/winsup/cygwin/local_includes/posix_timer.h
similarity index 100%
rename from winsup/cygwin/posix_timer.h
rename to winsup/cygwin/local_includes/posix_timer.h
diff --git a/winsup/cygwin/profil.h b/winsup/cygwin/local_includes/profil.h
similarity index 100%
rename from winsup/cygwin/profil.h
rename to winsup/cygwin/local_includes/profil.h
diff --git a/winsup/cygwin/pwdgrp.h b/winsup/cygwin/local_includes/pwdgrp.h
similarity index 100%
rename from winsup/cygwin/pwdgrp.h
rename to winsup/cygwin/local_includes/pwdgrp.h
diff --git a/winsup/cygwin/registry.h b/winsup/cygwin/local_includes/registry.h
similarity index 100%
rename from winsup/cygwin/registry.h
rename to winsup/cygwin/local_includes/registry.h
diff --git a/winsup/cygwin/sec_posixacl.h b/winsup/cygwin/local_includes/sec_posixacl.h
similarity index 100%
rename from winsup/cygwin/sec_posixacl.h
rename to winsup/cygwin/local_includes/sec_posixacl.h
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/local_includes/security.h
similarity index 100%
rename from winsup/cygwin/security.h
rename to winsup/cygwin/local_includes/security.h
diff --git a/winsup/cygwin/select.h b/winsup/cygwin/local_includes/select.h
similarity index 100%
rename from winsup/cygwin/select.h
rename to winsup/cygwin/local_includes/select.h
diff --git a/winsup/cygwin/shared_info.h b/winsup/cygwin/local_includes/shared_info.h
similarity index 100%
rename from winsup/cygwin/shared_info.h
rename to winsup/cygwin/local_includes/shared_info.h
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/local_includes/sigproc.h
similarity index 100%
rename from winsup/cygwin/sigproc.h
rename to winsup/cygwin/local_includes/sigproc.h
diff --git a/winsup/cygwin/spinlock.h b/winsup/cygwin/local_includes/spinlock.h
similarity index 100%
rename from winsup/cygwin/spinlock.h
rename to winsup/cygwin/local_includes/spinlock.h
diff --git a/winsup/cygwin/string.h b/winsup/cygwin/local_includes/string.h
similarity index 100%
rename from winsup/cygwin/string.h
rename to winsup/cygwin/local_includes/string.h
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/local_includes/sync.h
similarity index 100%
rename from winsup/cygwin/sync.h
rename to winsup/cygwin/local_includes/sync.h
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/local_includes/thread.h
similarity index 100%
rename from winsup/cygwin/thread.h
rename to winsup/cygwin/local_includes/thread.h
diff --git a/winsup/cygwin/timerfd.h b/winsup/cygwin/local_includes/timerfd.h
similarity index 100%
rename from winsup/cygwin/timerfd.h
rename to winsup/cygwin/local_includes/timerfd.h
diff --git a/winsup/cygwin/tls_pbuf.h b/winsup/cygwin/local_includes/tls_pbuf.h
similarity index 100%
rename from winsup/cygwin/tls_pbuf.h
rename to winsup/cygwin/local_includes/tls_pbuf.h
diff --git a/winsup/cygwin/tty.h b/winsup/cygwin/local_includes/tty.h
similarity index 100%
rename from winsup/cygwin/tty.h
rename to winsup/cygwin/local_includes/tty.h
diff --git a/winsup/cygwin/userinfo.h b/winsup/cygwin/local_includes/userinfo.h
similarity index 100%
rename from winsup/cygwin/userinfo.h
rename to winsup/cygwin/local_includes/userinfo.h
diff --git a/winsup/cygwin/vstrlist.h b/winsup/cygwin/local_includes/vstrlist.h
similarity index 100%
rename from winsup/cygwin/vstrlist.h
rename to winsup/cygwin/local_includes/vstrlist.h
diff --git a/winsup/cygwin/wchar.h b/winsup/cygwin/local_includes/wchar.h
similarity index 100%
rename from winsup/cygwin/wchar.h
rename to winsup/cygwin/local_includes/wchar.h
diff --git a/winsup/cygwin/wincap.h b/winsup/cygwin/local_includes/wincap.h
similarity index 100%
rename from winsup/cygwin/wincap.h
rename to winsup/cygwin/local_includes/wincap.h
diff --git a/winsup/cygwin/winf.h b/winsup/cygwin/local_includes/winf.h
similarity index 100%
rename from winsup/cygwin/winf.h
rename to winsup/cygwin/local_includes/winf.h
diff --git a/winsup/cygwin/wininfo.h b/winsup/cygwin/local_includes/wininfo.h
similarity index 100%
rename from winsup/cygwin/wininfo.h
rename to winsup/cygwin/local_includes/wininfo.h
diff --git a/winsup/cygwin/winlean.h b/winsup/cygwin/local_includes/winlean.h
similarity index 100%
rename from winsup/cygwin/winlean.h
rename to winsup/cygwin/local_includes/winlean.h
diff --git a/winsup/cygwin/winsup.h b/winsup/cygwin/local_includes/winsup.h
similarity index 100%
rename from winsup/cygwin/winsup.h
rename to winsup/cygwin/local_includes/winsup.h
diff --git a/winsup/cygwin/analyze_sigfe b/winsup/cygwin/scripts/analyze_sigfe
similarity index 100%
rename from winsup/cygwin/analyze_sigfe
rename to winsup/cygwin/scripts/analyze_sigfe
diff --git a/winsup/cygwin/cygmagic b/winsup/cygwin/scripts/cygmagic
similarity index 100%
rename from winsup/cygwin/cygmagic
rename to winsup/cygwin/scripts/cygmagic
diff --git a/winsup/cygwin/cygwin-shilka b/winsup/cygwin/scripts/cygwin-shilka
similarity index 100%
rename from winsup/cygwin/cygwin-shilka
rename to winsup/cygwin/scripts/cygwin-shilka
diff --git a/winsup/cygwin/gendef b/winsup/cygwin/scripts/gendef
similarity index 100%
rename from winsup/cygwin/gendef
rename to winsup/cygwin/scripts/gendef
diff --git a/winsup/cygwin/gendevices b/winsup/cygwin/scripts/gendevices
similarity index 100%
rename from winsup/cygwin/gendevices
rename to winsup/cygwin/scripts/gendevices
diff --git a/winsup/cygwin/gentls_offsets b/winsup/cygwin/scripts/gentls_offsets
similarity index 100%
rename from winsup/cygwin/gentls_offsets
rename to winsup/cygwin/scripts/gentls_offsets
diff --git a/winsup/cygwin/mkglobals_h b/winsup/cygwin/scripts/mkglobals_h
similarity index 100%
rename from winsup/cygwin/mkglobals_h
rename to winsup/cygwin/scripts/mkglobals_h
diff --git a/winsup/cygwin/mkimport b/winsup/cygwin/scripts/mkimport
similarity index 100%
rename from winsup/cygwin/mkimport
rename to winsup/cygwin/scripts/mkimport
diff --git a/winsup/cygwin/mkvers.sh b/winsup/cygwin/scripts/mkvers.sh
similarity index 100%
rename from winsup/cygwin/mkvers.sh
rename to winsup/cygwin/scripts/mkvers.sh
diff --git a/winsup/cygwin/sortdin b/winsup/cygwin/scripts/sortdin
similarity index 100%
rename from winsup/cygwin/sortdin
rename to winsup/cygwin/scripts/sortdin
diff --git a/winsup/cygwin/speclib b/winsup/cygwin/scripts/speclib
similarity index 100%
rename from winsup/cygwin/speclib
rename to winsup/cygwin/scripts/speclib
diff --git a/winsup/cygwin/update-copyright b/winsup/cygwin/scripts/update-copyright
similarity index 100%
rename from winsup/cygwin/update-copyright
rename to winsup/cygwin/scripts/update-copyright
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec/acl.cc
similarity index 99%
rename from winsup/cygwin/sec_acl.cc
rename to winsup/cygwin/sec/acl.cc
index 03dbb8050..5c23e22b6 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec/acl.cc
@@ -1,4 +1,4 @@
-/* sec_acl.cc: Solaris compatible ACL functions.
+/* sec/acl.cc: Solaris compatible ACL functions.
 
    Written by Corinna Vinschen <corinna@vinschen.de>
 
diff --git a/winsup/cygwin/sec_auth.cc b/winsup/cygwin/sec/auth.cc
similarity index 99%
rename from winsup/cygwin/sec_auth.cc
rename to winsup/cygwin/sec/auth.cc
index 8489a47a0..43b580389 100644
--- a/winsup/cygwin/sec_auth.cc
+++ b/winsup/cygwin/sec/auth.cc
@@ -1,4 +1,4 @@
-/* sec_auth.cc: NT authentication functions
+/* sec/auth.cc: NT authentication functions
 
 This file is part of Cygwin.
 
diff --git a/winsup/cygwin/security.cc b/winsup/cygwin/sec/base.cc
similarity index 99%
rename from winsup/cygwin/security.cc
rename to winsup/cygwin/sec/base.cc
index 04e777852..dc85ca72a 100644
--- a/winsup/cygwin/security.cc
+++ b/winsup/cygwin/sec/base.cc
@@ -1,4 +1,4 @@
-/* security.cc: NT file access control functions
+/* sec/base.cc: NT file access control functions
 
    Originaly written by Gunther Ebert, gunther.ebert@ixos-leipzig.de
    Completely rewritten by Corinna Vinschen <corinna@vinschen.de>
diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec/helper.cc
similarity index 99%
rename from winsup/cygwin/sec_helper.cc
rename to winsup/cygwin/sec/helper.cc
index fad3b3368..750631b2b 100644
--- a/winsup/cygwin/sec_helper.cc
+++ b/winsup/cygwin/sec/helper.cc
@@ -1,4 +1,4 @@
-/* sec_helper.cc: NT security helper functions
+/* sec/helper.cc: NT security helper functions
 
    Written by Corinna Vinschen <corinna@vinschen.de>
 
diff --git a/winsup/cygwin/sec_posixacl.cc b/winsup/cygwin/sec/posixacl.cc
similarity index 99%
rename from winsup/cygwin/sec_posixacl.cc
rename to winsup/cygwin/sec/posixacl.cc
index c2daa3309..6b01ded59 100644
--- a/winsup/cygwin/sec_posixacl.cc
+++ b/winsup/cygwin/sec/posixacl.cc
@@ -1,4 +1,4 @@
-/* sec_posixacl.cc: POSIX ACL functions based on Solaris ACLs.
+/* sec/posixacl.cc: POSIX ACL functions based on Solaris ACLs.
 
 This file is part of Cygwin.
 
diff --git a/winsup/utils/Makefile.am b/winsup/utils/Makefile.am
index e12dfdd00..6be5b12c2 100644
--- a/winsup/utils/Makefile.am
+++ b/winsup/utils/Makefile.am
@@ -83,7 +83,7 @@ ldd_LDADD = $(LDADD) -lpsapi -lntdll
 mount_CXXFLAGS = -DFSTAB_ONLY $(AM_CXXFLAGS)
 minidumper_LDADD = $(LDADD) -ldbghelp
 pldd_LDADD = $(LDADD) -lpsapi
-profiler_CXXFLAGS = -I$(srcdir) -idirafter ${top_srcdir}/cygwin -idirafter ${top_srcdir}/cygwin/include $(AM_CXXFLAGS)
+profiler_CXXFLAGS = -I$(srcdir) -idirafter ${top_srcdir}/cygwin/local_includes -idirafter ${top_srcdir}/cygwin/include $(AM_CXXFLAGS)
 profiler_LDADD = $(LDADD) -lntdll
 cygps_LDADD = $(LDADD) -lpsapi -lntdll
 
diff --git a/winsup/utils/mingw/Makefile.am b/winsup/utils/mingw/Makefile.am
index 46d821313..255fc4651 100644
--- a/winsup/utils/mingw/Makefile.am
+++ b/winsup/utils/mingw/Makefile.am
@@ -41,7 +41,7 @@ ldh_SOURCES = ldh.cc
 strace_SOURCES = \
 	path.cc \
 	strace.cc
-strace_CPPFLAGS=-I$(srcdir)/.. -idirafter ${top_srcdir}/cygwin -idirafter ${top_srcdir}/cygwin/include
+strace_CPPFLAGS=-I$(srcdir)/.. -idirafter ${top_srcdir}/cygwin/local_includes -idirafter ${top_srcdir}/cygwin/include
 strace_LDADD = -lntdll
 
 noinst_PROGRAMS = path-testsuite


More information about the Cygwin-cvs mailing list