components/stdcxx/patches/016-cstdio.patch
changeset 402 94ae4d75524c
equal deleted inserted replaced
401:bf52ef48020c 402:94ae4d75524c
       
     1 --- stdcxx-4.2.1/include/ansi/cstdio	2008-04-24 20:23:56.000000000 -0400
       
     2 +++ stdcxx-4.2.1/include/ansi/cstdio	2009-03-12 16:35:36.000000000 -0400
       
     3 @@ -1,313 +1,38 @@
       
     4  // -*- C++ -*-
       
     5 -/***************************************************************************
       
     6 +/**
       
     7 + * CDDL HEADER START
       
     8   *
       
     9 - * cstdio - C++ Standard library interface to the ANSI C header stdio.h
       
    10 + * The contents of this file are subject to the terms of the
       
    11 + * Common Development and Distribution License (the "License").
       
    12 + * You may not use this file except in compliance with the License.
       
    13   *
       
    14 - * $Id: cstdio 609466 2008-01-06 23:18:56Z sebor $
       
    15 + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
    16 + * or http://www.opensolaris.org/os/licensing.
       
    17 + * See the License for the specific language governing permissions
       
    18 + * and limitations under the License.
       
    19   *
       
    20 - ***************************************************************************
       
    21 + * When distributing Covered Code, include this CDDL HEADER in each
       
    22 + * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    23 + * If applicable, add the following below this CDDL HEADER, with the
       
    24 + * fields enclosed by brackets "[]" replaced with your own identifying
       
    25 + * information: Portions Copyright [yyyy] [name of copyright owner]
       
    26   *
       
    27 - * Licensed to the Apache Software  Foundation (ASF) under one or more
       
    28 - * contributor  license agreements.  See  the NOTICE  file distributed
       
    29 - * with  this  work  for  additional information  regarding  copyright
       
    30 - * ownership.   The ASF  licenses this  file to  you under  the Apache
       
    31 - * License, Version  2.0 (the  "License"); you may  not use  this file
       
    32 - * except in  compliance with the License.   You may obtain  a copy of
       
    33 - * the License at
       
    34 + * CDDL HEADER END
       
    35   *
       
    36 - * http://www.apache.org/licenses/LICENSE-2.0
       
    37   *
       
    38 - * Unless required by applicable law or agreed to in writing, software
       
    39 - * distributed under the  License is distributed on an  "AS IS" BASIS,
       
    40 - * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
       
    41 - * implied.   See  the License  for  the  specific language  governing
       
    42 - * permissions and limitations under the License.
       
    43 + * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
       
    44 + * Use is subject to license terms.
       
    45   *
       
    46 - * Copyright 1994-2007 Rogue Wave Software, Inc.
       
    47 - * 
       
    48 - **************************************************************************/
       
    49 -
       
    50 -#include <rw/_defs.h>
       
    51 -
       
    52 -#ifndef _RWSTD_NO_PURE_C_HEADERS
       
    53 -#  include <ansi/_cstdio.h>
       
    54 -#else
       
    55 -
       
    56 -#ifndef _RWSTD_NO_DEPRECATED_C_HEADERS
       
    57 -
       
    58 -#ifndef _RWSTD_NAMESPACE_STD_OPEN
       
    59 -#define _RWSTD_NAMESPACE_STD_OPEN 14
       
    60 -
       
    61 -_RWSTD_NAMESPACE (std) { 
       
    62 -
       
    63 -#endif   // _RWSTD_NAMESPACE_STD_OPEN
       
    64 -
       
    65 -
       
    66 -#include _RWSTD_ANSI_C_STDIO_H
       
    67 -
       
    68 -
       
    69 -#if _RWSTD_NAMESPACE_STD_OPEN == 14
       
    70 -#  undef _RWSTD_NAMESPACE_STD_OPEN
       
    71 -
       
    72 -}   // namespace std
       
    73 -
       
    74 -#endif   // _RWSTD_NAMESPACE_STD_OPEN == 14
       
    75 -
       
    76 -#else   // if defined (_RWSTD_NO_DEPRECATED_C_HEADERS)
       
    77 -
       
    78 -#ifndef _RWSTD_CSTDIO_INCLUDED
       
    79 -#define _RWSTD_CSTDIO_INCLUDED
       
    80 -
       
    81 -#include _RWSTD_ANSI_C_STDIO_H
       
    82 -
       
    83 + * ident "@(#)cstdio.16.diff 1.1     09/08/21 SMI"
       
    84 + */
       
    85  
       
    86 -// 27.8.2, p1, Table 94
       
    87 -#ifndef stdin
       
    88 -#  define stdin stdin
       
    89 -#endif
       
    90 +#ifndef _STDIO_H
       
    91  
       
    92 -#ifndef stdout
       
    93 -#  define stdout stdout
       
    94 -#endif
       
    95 -
       
    96 -#ifndef stderr
       
    97 -#  define stderr stderr
       
    98 -#endif
       
    99 -
       
   100 -#if !defined (_RWSTD_NO_NAMESPACE) && !defined (_RWSTD_NO_HONOR_STD) && \
       
   101 -    !defined (_RWSTD_NO_USING_LIBC_IN_STD)
       
   102 +#include <stdio.h>
       
   103  
       
   104  namespace std {
       
   105 +    extern "C" int fileno(FILE *);
       
   106 +}
       
   107  
       
   108 -    using ::size_t;
       
   109 -    using ::FILE;
       
   110 -
       
   111 -#ifndef _RWSTD_NO_FPOS_T
       
   112 -    using ::fpos_t;
       
   113 -#endif   // _RWSTD_NO_FPOS_T
       
   114 -
       
   115 -#ifndef _RWSTD_NO_CLEARERR
       
   116 -    using ::clearerr;
       
   117 -#endif   // _RWSTD_NO_CLEARERR
       
   118 -
       
   119 -#ifndef _RWSTD_NO_FCLOSE
       
   120 -    using ::fclose;
       
   121 -#endif   // _RWSTD_NO_FCLOSE
       
   122 -
       
   123 -#ifndef _RWSTD_NO_FEOF
       
   124 -    using ::feof;
       
   125 -#endif   // _RWSTD_NO_FEOF
       
   126 -
       
   127 -#ifndef _RWSTD_NO_FERROR
       
   128 -    using ::ferror;
       
   129 -#endif   // _RWSTD_NO_FERROR
       
   130 -
       
   131 -#ifndef _RWSTD_NO_FFLUSH
       
   132 -    using ::fflush;
       
   133 -#endif   // _RWSTD_NO_FFLUSH
       
   134 -
       
   135 -#ifndef _RWSTD_NO_FGETC
       
   136 -    using ::fgetc;
       
   137 -#endif   // _RWSTD_NO_FGETC
       
   138 -
       
   139 -#ifndef _RWSTD_NO_FGETPOS
       
   140 -    using ::fgetpos;
       
   141 -#endif   // _RWSTD_NO_FGETPOS
       
   142 -
       
   143 -#ifndef _RWSTD_NO_FGETS
       
   144 -    using ::fgets;
       
   145 -#endif   // _RWSTD_NO_FGETS
       
   146 -
       
   147 -#ifndef _RWSTD_NO_FOPEN
       
   148 -    using ::fopen;
       
   149 -#endif   // _RWSTD_NO_FOPEN
       
   150 -
       
   151 -#ifndef _RWSTD_NO_FPRINTF
       
   152 -    using ::fprintf;
       
   153 -#endif   // _RWSTD_NO_FPRINTF
       
   154 -
       
   155 -#ifndef _RWSTD_NO_FPUTC
       
   156 -    using ::fputc;
       
   157 -#endif   // _RWSTD_NO_FPUTC
       
   158 -
       
   159 -#ifndef _RWSTD_NO_FPUTS
       
   160 -    using ::fputs;
       
   161 -#endif   // _RWSTD_NO_FPUTS
       
   162 -
       
   163 -#ifndef _RWSTD_NO_FREAD
       
   164 -    using ::fread;
       
   165 -#endif   // _RWSTD_NO_FREAD
       
   166 -
       
   167 -#ifndef _RWSTD_NO_FREOPEN
       
   168 -    using ::freopen;
       
   169 -#endif   // _RWSTD_NO_FREOPEN
       
   170 -
       
   171 -#ifndef _RWSTD_NO_FSCANF
       
   172 -    using ::fscanf;
       
   173 -#endif   // _RWSTD_NO_FSCANF
       
   174 -
       
   175 -#ifndef _RWSTD_NO_FSEEK
       
   176 -    using ::fseek;
       
   177 -#endif   // _RWSTD_NO_FSEEK
       
   178 -
       
   179 -#ifndef _RWSTD_NO_FSETPOS
       
   180 -    using ::fsetpos;
       
   181 -#endif   // _RWSTD_NO_FSETPOS
       
   182 -
       
   183 -#ifndef _RWSTD_NO_FTELL
       
   184 -    using ::ftell;
       
   185 -#endif   // _RWSTD_NO_FTELL
       
   186 -
       
   187 -#ifndef _RWSTD_NO_FWRITE
       
   188 -    using ::fwrite;
       
   189 -#endif   // _RWSTD_NO_FWRITE
       
   190 -
       
   191 -#ifndef _RWSTD_NO_GETC
       
   192 -    using ::getc;
       
   193 -#endif   // _RWSTD_NO_GETC
       
   194 -
       
   195 -#ifndef _RWSTD_NO_GETCHAR
       
   196 -    using ::getchar;
       
   197 -#endif   // _RWSTD_NO_GETCHAR
       
   198 -
       
   199 -#ifndef _RWSTD_NO_GETS
       
   200 -    using ::gets;
       
   201 -#endif   // _RWSTD_NO_GETS
       
   202 -
       
   203 -#ifndef _RWSTD_NO_PERROR
       
   204 -    using ::perror;
       
   205 -#endif   // _RWSTD_NO_PERROR
       
   206 -
       
   207 -#ifndef _RWSTD_NO_PRINTF
       
   208 -    using ::printf;
       
   209 -#endif   // _RWSTD_NO_PRINTF
       
   210 -
       
   211 -#ifndef _RWSTD_NO_PUTC
       
   212 -    using ::putc;
       
   213 -#endif   // _RWSTD_NO_PUTC
       
   214 -
       
   215 -#ifndef _RWSTD_NO_PUTCHAR
       
   216 -    using ::putchar;
       
   217 -#endif   // _RWSTD_NO_PUTCHAR
       
   218 -
       
   219 -#ifndef _RWSTD_NO_PUTS
       
   220 -    using ::puts;
       
   221 -#endif   // _RWSTD_NO_PUTS
       
   222 -
       
   223 -#ifndef _RWSTD_NO_REMOVE
       
   224 -    using ::remove;
       
   225 -#endif   // _RWSTD_NO_REMOVE
       
   226 -
       
   227 -#ifndef _RWSTD_NO_RENAME
       
   228 -    using ::rename;
       
   229 -#endif   // _RWSTD_NO_RENAME
       
   230 -
       
   231 -#ifndef _RWSTD_NO_REWIND
       
   232 -    using ::rewind;
       
   233 -#endif   // _RWSTD_NO_REWIND
       
   234 -
       
   235 -#ifndef _RWSTD_NO_SCANF
       
   236 -    using ::scanf;
       
   237 -#endif   // _RWSTD_NO_SCANF
       
   238 -
       
   239 -#ifndef _RWSTD_NO_SETBUF
       
   240 -    using ::setbuf;
       
   241 -#endif   // _RWSTD_NO_SETBUF
       
   242 -
       
   243 -#ifndef _RWSTD_NO_SETVBUF
       
   244 -    using ::setvbuf;
       
   245 -#endif   // _RWSTD_NO_SETVBUF
       
   246 -
       
   247 -#ifndef _RWSTD_NO_SPRINTF
       
   248 -    using ::sprintf;
       
   249 -#endif   // _RWSTD_NO_SPRINTF
       
   250 -
       
   251 -#ifndef _RWSTD_NO_SSCANF
       
   252 -    using ::sscanf;
       
   253 -#endif   // _RWSTD_NO_SSCANF
       
   254 -
       
   255 -#ifndef _RWSTD_NO_TMPFILE
       
   256 -    using ::tmpfile;
       
   257 -#endif   // _RWSTD_NO_TMPFILE
       
   258 -
       
   259 -#ifndef _RWSTD_NO_TMPNAM
       
   260 -    using ::tmpnam;
       
   261 -#else
       
   262 -#  ifndef _RWSTD_NO_TMPNAM_IN_LIBC
       
   263 -    extern "C" char *tmpnam (char *);
       
   264 -#  endif // _RWSTD_NO_TMPNAM_IN_LIBC
       
   265 -#endif   // _RWSTD_NO_TMPNAM
       
   266 -
       
   267 -#ifndef _RWSTD_NO_UNGETC
       
   268 -    using ::ungetc;
       
   269 -#endif   // _RWSTD_NO_UNGETC
       
   270 -
       
   271 -#ifndef _RWSTD_NO_VFPRINTF
       
   272 -    using ::vfprintf;
       
   273 -#endif   // _RWSTD_NO_VFPRINTF
       
   274 -
       
   275 -#ifndef _RWSTD_NO_VPRINTF
       
   276 -    using ::vprintf;
       
   277 -#endif   // _RWSTD_NO_VPRINTF
       
   278 -
       
   279 -#ifndef _RWSTD_NO_VSPRINTF
       
   280 -    using ::vsprintf;
       
   281 -#endif   // _RWSTD_NO_VSPRINTF
       
   282 -
       
   283 -}   // std
       
   284 -
       
   285 -
       
   286 -#ifdef _RWSTD_STRICT_ANSI
       
   287 -// undefine shadow macros in strict mode
       
   288 -#  undef fpos_t
       
   289 -#  undef remove
       
   290 -#  undef rename
       
   291 -#  undef tmpfile
       
   292 -#  undef tmpnam
       
   293 -#  undef fclose
       
   294 -#  undef fflush
       
   295 -#  undef fopen
       
   296 -#  undef freopen
       
   297 -#  undef setbuf
       
   298 -#  undef setvbuf
       
   299 -#  undef fprintf
       
   300 -#  undef fscanf
       
   301 -#  undef printf
       
   302 -#  undef scanf
       
   303 -#  undef sprintf
       
   304 -#  undef sscanf
       
   305 -#  undef vfprintf
       
   306 -#  undef vprintf
       
   307 -#  undef vsprintf
       
   308 -#  undef fgetc
       
   309 -#  undef fgets
       
   310 -#  undef fputc
       
   311 -#  undef fputs
       
   312 -#  undef getc
       
   313 -#  undef getchar
       
   314 -#  undef gets
       
   315 -#  undef putc
       
   316 -#  undef putchar
       
   317 -#  undef puts
       
   318 -#  undef ungetc
       
   319 -#  undef fread
       
   320 -#  undef fwrite
       
   321 -#  undef fgetpos
       
   322 -#  undef fseek
       
   323 -#  undef fsetpos
       
   324 -#  undef ftell
       
   325 -#  undef rewind
       
   326 -#  undef clearerr
       
   327 -#  undef feof
       
   328 -#  undef ferror
       
   329 -#  undef perror
       
   330 -#endif
       
   331 -
       
   332 -
       
   333 -#endif   // !_NO_NAMESPACE && !__NO_HONOR_STD && !_NO_USING_LIBC_IN_STD
       
   334 -
       
   335 -#endif   // _RWSTD_CSTDIO_INCLUDED
       
   336 -
       
   337 -#endif   // _RWSTD_NO_DEPRECATED_C_HEADERS
       
   338 +#endif /* _STDIO_H */
       
   339  
       
   340 -#endif   // _RWSTD_NO_PURE_C_HEADERS