* Makefile.in (cygpath.exe): Add rule to link cygpath against ntdll.dll.

* cygpath.cc: Include DDK headers.
	(RtlAllocateUnicodeString): New static inline function.
	(get_device_name): New static function to evaluate DOS path from
	native NT path.
	(get_device_paths): New function to do the same for path lists.
	(doit): Call get_device_paths/get_device_name where appropriate.
This commit is contained in:
Corinna Vinschen
2006-08-02 09:48:18 +00:00
parent 2ebf115df9
commit 2dba45f4aa
3 changed files with 178 additions and 0 deletions

View File

@@ -208,6 +208,14 @@ else
$(CXX) -o $@ ${wordlist 1,3,$^} -B$(cygwin_build)/ $(DUMPER_LDFLAGS)
endif
cygpath.exe: cygpath.o $(ALL_DEP_LDLIBS)
ifdef VERBOSE
$(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) -lntdll
else
@echo $(CXX) -o $@ ${firstword $^} ${filter-out -B%, $(ALL_LDFLAGS) -ntdll};\
$(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS) -ntdll
endif
%.exe: %.o $(ALL_DEP_LDLIBS)
ifdef VERBOSE
$(CXX) -o $@ ${firstword $^} -B$(cygwin_build)/ $(ALL_LDFLAGS)