Commit Graph

8 Commits

Author SHA1 Message Date
Chun-wei Fan
97959cd7eb msvc_recommended_pragmas.h: Refine for clang-cl
Make msvc_recommended_pragmas.h work better with clang-cl so that we can
use that to eliminate some warnings that are emitted as it also consumes
Microsoft compiler and SDK headers.

Also, for GLib builds, force-include msvc_recommended_pragmas.h for
clang-cl builds as well, as it becomes usable and useful there.

Fixes issue #2357.
2021-03-30 16:45:07 +08:00
Emmanuel Fleury
c1d74e35c1 Adding macros G_NORETURN and G_NORETURN_FUNCPTR
This macro is borrowed from the gnulib project in the 'noreturn.h' file.

Fixes: #994
2020-11-25 11:34:05 +00:00
Chun-wei Fan
0dbe5c43df msvc_recommended_pragmas.h: Treat C4819 warnings as errors
Warning C4819 in Visual Studio builds indicates an issue of Visual Studio
2005 and later running on East Asian locales of Windows, which likely
results in broken builds of GLib, Pango, GTK+, and possibly other GNOME
projects such as Cogl and Clutter (and is also an issue when building other
projects like QT and Firefox).

Treat this warning as an error as a result when building GLib-based items
on Visual Studio, and tell people how to remedy this issue correctly.
2013-11-25 15:26:25 +08:00
Chun-wei Fan
599d1a430e msvc_recommended_pragmas.h: Re-enable C4819 warnings
Apparently the C4819 warnings appear due to a bug on Visual C++ on DBCS
locales, so re-enable this.

Add a note in the Visual C++ Readme.txt's regarding this.
2012-06-20 10:19:14 +08:00
Chun-wei Fan
c9f55445aa msvc_recommended_pragmas.h: Silence C4819 warnings
This warning appears when unicode chars that cannot be displayed in the
current Windows code page is used anywhere in the file, including comment
blocks.  We probably don't need to see these, especially as problems
caused by such characters are manifested as other warnings or errors,
for example, the need to add BOM to a file when compiling code with
complex script on Windows.
2012-03-08 17:19:15 +08:00
Chun-wei Fan
b93d6ab83a Bug 661438: Update msvc_recommended_pragmas.h
Don't disable warning C4996 as that is the Visual C++ warning triggered by
__declspec(deprecated) and __declspec(deprecated('..."))-disabling that
warning will defeat the purpose of G_DPRECATED/G_DEPRECATED_FOR.

For people who don't want to see the GLib deprecation warnings during GLib
compilation, define GLIB_DISABLE_DEPRECATION_WARNINGS in the projects or
property sheet.
2011-10-12 10:53:30 +08:00
Hans Breuer
b877c83cdc removed -GD to compile with msvc9 (vs2008) with less complains
2007-12-09  Hans Breuer  <hans@breuer.org>

	* **/makefile.msc glib/makefile.msc.in : removed -GD to compile
	with msvc9 (vs2008) with less complains
	
	* glibconfig.h.win32.in : #define G_HAVE_ISO_VARARGS 1 for
	msv8 (vs2005) and above
	
	* glib/gfileutils.c : s/stricmp/_stricmp/
	* msvc_recommended_pragmas.h : work around Microsoft's premature 
	attempt to deprecate the C-Library

	* tests/makefile.msc.in : added checksum-test


svn path=/trunk/; revision=6076
2007-12-09 14:38:26 +00:00
Hans Breuer
abc754faca moved warning to error pragmas to their own file to not force 'good
2002-01-05  Hans Breuer  <hans@breuer.org>

	* glibconfig.h.win32.in
	  msvc_recommended_pragmas.h (new file) : moved warning to
	error pragmas to their own file to not force 'good practice'
	programming in downstream libs and apps. Instead the new header
	will be used by -FImsvc_recommended_pragmas.h in gnome/cvs
	makefile.msc
	* */makefile.msc.in : use -FImsvc_recommended_pragmas.h
2002-01-05 18:54:59 +00:00