Browse Source

In ANSI C++, wchar_t is a builtin. gcc 2.95.1 handles that correctly.

Redefining it as a typedef is an error, as it prevents overloading
on e.g., int/wchar_t separately.
OPENBSD_2_7
espie 24 years ago
parent
commit
ecdb2b8203
2 changed files with 8 additions and 2 deletions
  1. +4
    -1
      src/include/stddef.h
  2. +4
    -1
      src/include/stdlib.h

+ 4
- 1
src/include/stddef.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stddef.h,v 1.3 1999/06/11 22:47:48 espie Exp $ */
/* $OpenBSD: stddef.h,v 1.4 1999/11/27 13:20:25 espie Exp $ */
/* $NetBSD: stddef.h,v 1.4 1994/10/26 00:56:26 cgd Exp $ */
/*-
@ -49,9 +49,12 @@ typedef _BSD_SIZE_T_ size_t;
#endif
#ifdef _BSD_WCHAR_T_
/* in C++, wchar_t is a built-in type */
#ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_
#endif
#endif
#ifndef NULL
#ifdef __GNUG__


+ 4
- 1
src/include/stdlib.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: stdlib.h,v 1.10 1999/06/11 22:47:48 espie Exp $ */
/* $OpenBSD: stdlib.h,v 1.11 1999/11/27 13:20:25 espie Exp $ */
/* $NetBSD: stdlib.h,v 1.25 1995/12/27 21:19:08 jtc Exp $ */
/*-
@ -50,7 +50,10 @@ typedef _BSD_SIZE_T_ size_t;
#endif
#ifdef _BSD_WCHAR_T_
/* in C++, wchar_t is a built-in type */
#ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t;
#endif
#undef _BSD_WCHAR_T_
#endif


Loading…
Cancel
Save