This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Recent cygwin update is missing tchar header file


On Jun 17 06:40, JonY wrote:
> On 6/16/2015 17:34, Corinna Vinschen wrote:
> > On Jun 16 06:24, JonY wrote:
> >> On 6/16/2015 00:41, Corinna Vinschen wrote:
> >>> Hi Jon,
> >>>
> >>> any idea what happened to tchar.h in the latest w32api update?
> >>>
> >>
> >> tchar.h seems to be part of the CRT headers rather than the w32api
> >> headers. I'll see getting it installed regardless.
> > 
> > Hmm, that may not be as easy as it sounds.
> > 
> > I checked the w32api-headers 3.3 0 version and there was no tchar.h in
> > it either, so this isn't new.  I assume the last time the package has
> > been built successfully was against w32api headers from Mingw.org.
> > 
> > tchar.h in Mingw-w64 pulls a rat tail of other headers in:
> > 
> >   $ grep '#include' tchar.h 
> >   #include <crtdefs.h>
> >   #include <wchar.h>
> >   #include <string.h>
> >   #include <mbstring.h>
> >   #include <sec_api/tchar_s.h>
> > 
> > AFAICS, oledlg.h pulls in tchar.h
> > solely to get the definition of the macro _TEXT.
> > 
> > So we are better off to define our own tchar.h, or, even better, to
> > tweak tchar.h for Cygwin upstream.  If we exclude everything except for
> > the definitions of _T, _TEXT, _TEOF, and the types like _TCHAR etc., we
> > should be good.
> > 
> > Something like this (untested):

Actually, I checked the results yesterday using something like

  i686-pc-cygwin-gcc -x c -E -dDI tchar.h | view -
  i686-pc-cygwin-gcc -D_UNICODE -x c -E -dDI tchar.h | view -
  i686-pc-cygwin-gcc -x c++ -E -dDI tchar.h | view -
  i686-pc-cygwin-gcc -D_UNICODE -x c++ -E -dDI tchar.h | view -

and it looked good, afaics.

> > [...]
> 
> Kai, Ping.

This will be required, too:

diff --git a/mingw-w64-headers/configure b/mingw-w64-headers/configure
index abc4d42..fecd20e 100755
--- a/mingw-w64-headers/configure
+++ b/mingw-w64-headers/configure
@@ -2545,7 +2545,7 @@ fi
 
 # Checks for header files.
 
-BASEHEAD_LIST="crt/_bsd_types.h crt/_cygwin.h crt/_mingw.h crt/_mingw_mac.h crt/_mingw_print_push.h crt/_mingw_print_pop.h crt/_mingw_secapi.h crt/_mingw_unicode.h crt/_timeval.h crt/crtdefs.h crt/excpt.h crt/intrin.h crt/vadefs.h "$srcdir/include/*.h
+BASEHEAD_LIST="crt/_bsd_types.h crt/_cygwin.h crt/_mingw.h crt/_mingw_mac.h crt/_mingw_print_push.h crt/_mingw_print_pop.h crt/_mingw_secapi.h crt/_mingw_unicode.h crt/_timeval.h crt/crtdefs.h crt/excpt.h crt/intrin.h crt/tchar.h crt/vadefs.h "$srcdir/include/*.h
 SECHEAD_LIST="$srcdir/crt/sec_api/stralign_s.h"
 for i in c dlg h16 hxx rh ver; do
   BASEHEAD_LIST="$BASEHEAD_LIST "$srcdir/include/*.$i
diff --git a/mingw-w64-headers/configure.ac b/mingw-w64-headers/configure.ac
index 7e3863d..b1d5d8c 100644
--- a/mingw-w64-headers/configure.ac
+++ b/mingw-w64-headers/configure.ac
@@ -39,7 +39,7 @@ AM_CONDITIONAL([HAVE_WIDL],[AS_VAR_TEST_SET([WIDL])])
 
 # Checks for header files.
 
-BASEHEAD_LIST="crt/_bsd_types.h crt/_cygwin.h crt/_mingw.h crt/_mingw_mac.h crt/_mingw_print_push.h crt/_mingw_print_pop.h crt/_mingw_secapi.h crt/_mingw_unicode.h crt/_timeval.h crt/crtdefs.h crt/excpt.h crt/intrin.h crt/vadefs.h "$srcdir/include/*.h
+BASEHEAD_LIST="crt/_bsd_types.h crt/_cygwin.h crt/_mingw.h crt/_mingw_mac.h crt/_mingw_print_push.h crt/_mingw_print_pop.h crt/_mingw_secapi.h crt/_mingw_unicode.h crt/_timeval.h crt/crtdefs.h crt/excpt.h crt/intrin.h crt/tchar.h crt/vadefs.h "$srcdir/include/*.h
 SECHEAD_LIST="$srcdir/crt/sec_api/stralign_s.h"
 for i in c dlg h16 hxx rh ver; do
   BASEHEAD_LIST="$BASEHEAD_LIST "$srcdir/include/*.$i


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgphersoQ51QR.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]