Skip to content

Commit

Permalink
4730330 incorrect definition of WEOF in /usr/include/iso/wctype_iso.h
Browse files Browse the repository at this point in the history
6432430 stdbool.h should be a no-op for C++ compilations
6438052 sethostname(3c) missing prototype in unistd.h
  • Loading branch information
damico committed Jun 23, 2006
1 parent 0726226 commit eec1faa
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 30 deletions.
12 changes: 8 additions & 4 deletions usr/src/head/iso/wchar_iso.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
Expand All @@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/

/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/

Expand Down Expand Up @@ -118,8 +118,12 @@ typedef unsigned int size_t; /* (historical version) */
#endif /* !NULL */

#ifndef WEOF
#if __cplusplus >= 199711L
#define WEOF ((std::wint_t)(-1))
#else
#define WEOF ((wint_t)(-1))
#endif
#endif /* WEOF */

/* not XPG4 and not XPG4v2 */
#if !defined(_XPG4) || defined(_XPG5)
Expand Down
12 changes: 8 additions & 4 deletions usr/src/head/iso/wctype_iso.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
Expand All @@ -19,12 +18,13 @@
*
* CDDL HEADER END
*/

/* wctype.h 1.13 89/11/02 SMI; JLE */
/* from AT&T JAE 2.1 */
/* definitions for international functions */

/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/

Expand Down Expand Up @@ -74,8 +74,12 @@ typedef unsigned int wctrans_t;
/* not XPG4 and not XPG4v2 */
#if !defined(_XPG4) || defined(_XPG5)
#ifndef WEOF
#if __cplusplus >= 199711L
#define WEOF ((std::wint_t)(-1))
#else
#define WEOF ((wint_t)(-1))
#endif
#endif /* WEOF */
#endif /* not XPG4 and not XPG4v2 */

#ifdef __STDC__
Expand Down
23 changes: 5 additions & 18 deletions usr/src/head/stdbool.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
Expand All @@ -19,8 +18,9 @@
*
* CDDL HEADER END
*/

/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/

Expand All @@ -29,15 +29,10 @@

#pragma ident "%Z%%M% %I% %E% SMI"

#ifdef __cplusplus
extern "C" {
#endif

/*
* Included for alignment with the ISO/IEC 9899:1999 standard. The
* contents of this header are only visible when using a c99
* compiler, otherwise inclusion of this header will result in a
* forced compilation failure.
* compiler.
*
* Note that the ability to undefine and redefine the macros bool,
* true, and false is an obsolescent feature which may be withdrawn
Expand All @@ -58,14 +53,6 @@ extern "C" {

#define __bool_true_false_are_defined 1

#else /* _STDC_C99 */

#error "Use of <stdbool.h> is valid only in a c99 compilation environment."

#endif /* _STDC_C99 */

#ifdef __cplusplus
}
#endif

#endif /* _STDBOOL_H */
9 changes: 5 additions & 4 deletions usr/src/head/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
Expand All @@ -24,7 +23,7 @@


/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/

Expand Down Expand Up @@ -493,6 +492,7 @@ extern int seteuid(uid_t);
extern int setgid(gid_t);
#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
extern int setgroups(int, const gid_t *);
extern int sethostname(char *, int);
#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
extern int setpgid(pid_t, pid_t);
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
Expand Down Expand Up @@ -788,6 +788,7 @@ extern int seteuid();
extern int setgid();
#if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
extern int setgroups();
extern int sethostname();
#endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
extern int setpgid();
#if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || defined(__EXTENSIONS__)
Expand Down

0 comments on commit eec1faa

Please sign in to comment.