use wx/crt.h as the 'official' header for wxCRT wrappers instead of wxchar.h; add comments explaining that users should include wx/crt.h to implementation headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46395 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,6 +11,11 @@
|
||||
#ifndef _WX_CRT_H_
|
||||
#define _WX_CRT_H_
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
// include wxChar type definition:
|
||||
#include "wx/chartype.h"
|
||||
|
||||
// and wrappers for CRT functions:
|
||||
#include "wx/wxcrt.h"
|
||||
#include "wx/wxcrtvararg.h"
|
||||
|
||||
#endif // _WX_CRT_H_
|
||||
|
@@ -3094,11 +3094,11 @@ wxStringIteratorNode::~wxStringIteratorNode()
|
||||
#endif // wxUSE_UNICODE_UTF8
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
// lot of code out there doesn't explicitly include wx/wxchar.h, but uses
|
||||
// lot of code out there doesn't explicitly include wx/crt.h, but uses
|
||||
// CRT wrappers that are now declared in wx/wxcrt.h and wx/wxcrtvararg.h,
|
||||
// so let's include this header now that wxString is defined and it's safe
|
||||
// to do it:
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#endif
|
||||
|
||||
#endif // _WX_WXSTRING_H_
|
||||
|
@@ -12,11 +12,8 @@
|
||||
#ifndef _WX_WXCHAR_H_
|
||||
#define _WX_WXCHAR_H_
|
||||
|
||||
// include wxChar type definition:
|
||||
#include "wx/chartype.h"
|
||||
|
||||
// and wrappers for CRT functions:
|
||||
#include "wx/wxcrt.h"
|
||||
#include "wx/wxcrtvararg.h"
|
||||
// This header used to define CRT functions wrappers in wxWidgets 2.8. This is
|
||||
// now done in (headers included by) wx/crt.h, so include it for compatibility:
|
||||
#include "wx/crt.h"
|
||||
|
||||
#endif /* _WX_WXCHAR_H_ */
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#ifndef _WX_WXCRT_H_
|
||||
#define _WX_WXCRT_H_
|
||||
|
||||
// NB: User code should include wx/crt.h instead of including this
|
||||
// header directly.
|
||||
|
||||
#include "wx/wxcrtbase.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
|
@@ -13,6 +13,9 @@
|
||||
#ifndef _WX_WXCRTVARARG_H_
|
||||
#define _WX_WXCRTVARARG_H_
|
||||
|
||||
// NB: User code should include wx/crt.h instead of including this
|
||||
// header directly.
|
||||
|
||||
#include "wx/wxcrt.h"
|
||||
#include "wx/strvararg.h"
|
||||
|
||||
|
@@ -43,7 +43,7 @@
|
||||
#endif
|
||||
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@@ -42,7 +42,7 @@
|
||||
#include "wx/msgout.h"
|
||||
#include "wx/textfile.h"
|
||||
#include "wx/thread.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
|
||||
// other standard headers
|
||||
#ifndef __WXWINCE__
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
|
||||
#define _ISOC9X_SOURCE 1 // to get vsscanf()
|
||||
#define _BSD_SOURCE 1 // to still get strdup()
|
||||
@@ -90,7 +90,7 @@ size_t WXDLLEXPORT wxMB2WC(wchar_t *buf, const char *psz, size_t n)
|
||||
// to just get the size of the needed buffer -- this is needed as otherwise
|
||||
// we have no idea about how much space we need and if the CRT doesn't
|
||||
// support it (the only currently known example being Metrowerks, see
|
||||
// wx/wxchar.h) we don't use its mbstowcs() at all
|
||||
// wx/crt.h) we don't use its mbstowcs() at all
|
||||
#ifdef HAVE_WCSRTOMBS
|
||||
return mbsrtowcs((wchar_t *) NULL, &psz, 0, &mbstate);
|
||||
#else
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#pragma hdrstop
|
||||
#endif
|
||||
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#include "wx/utils.h"
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/listbox.h"
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include "wx/intl.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#include "wx/dcclient.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/textctrl.h"
|
||||
|
@@ -40,7 +40,7 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
@@ -28,7 +28,7 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
@@ -18,7 +18,7 @@
|
||||
|
||||
#ifndef WX_PRECOMP
|
||||
#include <stdio.h>
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#include "wx/string.h"
|
||||
#include "wx/bitmap.h"
|
||||
#include "wx/brush.h"
|
||||
|
@@ -39,7 +39,7 @@
|
||||
#include "wx/dialog.h"
|
||||
#include "wx/msgdlg.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
#include "wx/log.h"
|
||||
#include "wx/module.h"
|
||||
#endif
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "wx/filefn.h"
|
||||
#include "wx/ffile.h"
|
||||
#include "wx/process.h"
|
||||
#include "wx/wxchar.h"
|
||||
#include "wx/crt.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
Reference in New Issue
Block a user