delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/09/08/13:41:10

Message-Id: <199809081700.RAA76106@out4.ibm.net>
From: "Mark E." <snowball3 AT usa DOT net>
To: djgpp-workers AT delorie DOT com
Date: Tue, 8 Sep 1998 12:02:51 +0000
MIME-Version: 1.0
Subject: proposed patch for djtypes.h

--Message-Boundary-19525
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

The attatched patch changes the macro __DJ_wchar_t to take into 
account that in C++ (and only C++) wchar_t is a now a builtin type.

Mark

-- 
Mark E. snowball3 AT usa DOT net
http://members.xoom.com/snowball3/


--Message-Boundary-19525
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'djtypes.diff'

--- c:\djgpp\dj202\include\sys\djtypes.h       Sun Oct 30 01:22:34 1994
+++ djtypes.h	Tue Sep  8 11:47:28 1998
@@ -11,6 +11,13 @@
 #define __DJ_time_t	typedef unsigned int time_t;
 #define __DJ_uid_t	typedef int uid_t;
 #define __DJ_va_list	typedef void *va_list;
-#define __DJ_wchar_t	typedef int wchar_t;
+
+#if defined(__cplusplus) && (__GNUC_MINOR__ >= 8)
+// wchar_t is now a keyword in C++...
+#  define __DJ_wchar_t
+#else
+// ... but remains a typedef in C
+#  define __DJ_wchar_t    typedef int wchar_t;
+#endif
 
 #endif

--Message-Boundary-19525--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019