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 25 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 $ */ /* $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 #endif
#ifdef _BSD_WCHAR_T_ #ifdef _BSD_WCHAR_T_
/* in C++, wchar_t is a built-in type */
#ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t; typedef _BSD_WCHAR_T_ wchar_t;
#undef _BSD_WCHAR_T_ #undef _BSD_WCHAR_T_
#endif #endif
#endif
#ifndef NULL #ifndef NULL
#ifdef __GNUG__ #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 $ */ /* $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 #endif
#ifdef _BSD_WCHAR_T_ #ifdef _BSD_WCHAR_T_
/* in C++, wchar_t is a built-in type */
#ifndef __cplusplus
typedef _BSD_WCHAR_T_ wchar_t; typedef _BSD_WCHAR_T_ wchar_t;
#endif
#undef _BSD_WCHAR_T_ #undef _BSD_WCHAR_T_
#endif #endif


Loading…
Cancel
Save