mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-23 20:09:41 +00:00
7c3769df62
to reflect the new license. These used slightly different spellings that defeated my regular expressions. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@351648 91177308-0d34-0410-b5e6-96231b3b80d8
172 lines
4.2 KiB
C++
172 lines
4.2 KiB
C++
// -*- C++ -*-
|
|
//===---------------------------- cstdio ----------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef _LIBCPP_CSTDIO
|
|
#define _LIBCPP_CSTDIO
|
|
|
|
/*
|
|
cstdio synopsis
|
|
|
|
Macros:
|
|
|
|
BUFSIZ
|
|
EOF
|
|
FILENAME_MAX
|
|
FOPEN_MAX
|
|
L_tmpnam
|
|
NULL
|
|
SEEK_CUR
|
|
SEEK_END
|
|
SEEK_SET
|
|
TMP_MAX
|
|
_IOFBF
|
|
_IOLBF
|
|
_IONBF
|
|
stderr
|
|
stdin
|
|
stdout
|
|
|
|
namespace std
|
|
{
|
|
|
|
Types:
|
|
|
|
FILE
|
|
fpos_t
|
|
size_t
|
|
|
|
int remove(const char* filename);
|
|
int rename(const char* old, const char* new);
|
|
FILE* tmpfile(void);
|
|
char* tmpnam(char* s);
|
|
int fclose(FILE* stream);
|
|
int fflush(FILE* stream);
|
|
FILE* fopen(const char* restrict filename, const char* restrict mode);
|
|
FILE* freopen(const char* restrict filename, const char * restrict mode,
|
|
FILE * restrict stream);
|
|
void setbuf(FILE* restrict stream, char* restrict buf);
|
|
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
|
|
int fprintf(FILE* restrict stream, const char* restrict format, ...);
|
|
int fscanf(FILE* restrict stream, const char * restrict format, ...);
|
|
int printf(const char* restrict format, ...);
|
|
int scanf(const char* restrict format, ...);
|
|
int snprintf(char* restrict s, size_t n, const char* restrict format, ...); // C99
|
|
int sprintf(char* restrict s, const char* restrict format, ...);
|
|
int sscanf(const char* restrict s, const char* restrict format, ...);
|
|
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
|
|
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg); // C99
|
|
int vprintf(const char* restrict format, va_list arg);
|
|
int vscanf(const char* restrict format, va_list arg); // C99
|
|
int vsnprintf(char* restrict s, size_t n, const char* restrict format, // C99
|
|
va_list arg);
|
|
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
|
|
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
|
|
int fgetc(FILE* stream);
|
|
char* fgets(char* restrict s, int n, FILE* restrict stream);
|
|
int fputc(int c, FILE* stream);
|
|
int fputs(const char* restrict s, FILE* restrict stream);
|
|
int getc(FILE* stream);
|
|
int getchar(void);
|
|
char* gets(char* s); // removed in C++14
|
|
int putc(int c, FILE* stream);
|
|
int putchar(int c);
|
|
int puts(const char* s);
|
|
int ungetc(int c, FILE* stream);
|
|
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
|
|
FILE* restrict stream);
|
|
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
|
|
FILE* restrict stream);
|
|
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
|
|
int fseek(FILE* stream, long offset, int whence);
|
|
int fsetpos(FILE*stream, const fpos_t* pos);
|
|
long ftell(FILE* stream);
|
|
void rewind(FILE* stream);
|
|
void clearerr(FILE* stream);
|
|
int feof(FILE* stream);
|
|
int ferror(FILE* stream);
|
|
void perror(const char* s);
|
|
|
|
} // std
|
|
*/
|
|
|
|
#include <__config>
|
|
#include <stdio.h>
|
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
|
#pragma GCC system_header
|
|
#endif
|
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
using ::FILE;
|
|
using ::fpos_t;
|
|
using ::size_t;
|
|
|
|
using ::fclose;
|
|
using ::fflush;
|
|
using ::setbuf;
|
|
using ::setvbuf;
|
|
using ::fprintf;
|
|
using ::fscanf;
|
|
using ::snprintf;
|
|
using ::sprintf;
|
|
using ::sscanf;
|
|
using ::vfprintf;
|
|
using ::vfscanf;
|
|
using ::vsscanf;
|
|
using ::vsnprintf;
|
|
using ::vsprintf;
|
|
using ::fgetc;
|
|
using ::fgets;
|
|
using ::fputc;
|
|
using ::fputs;
|
|
using ::getc;
|
|
using ::putc;
|
|
using ::ungetc;
|
|
using ::fread;
|
|
using ::fwrite;
|
|
using ::fgetpos;
|
|
using ::fseek;
|
|
using ::fsetpos;
|
|
using ::ftell;
|
|
using ::rewind;
|
|
using ::clearerr;
|
|
using ::feof;
|
|
using ::ferror;
|
|
using ::perror;
|
|
|
|
#ifndef _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE
|
|
using ::fopen;
|
|
using ::freopen;
|
|
using ::remove;
|
|
using ::rename;
|
|
using ::tmpfile;
|
|
using ::tmpnam;
|
|
#endif
|
|
|
|
#ifndef _LIBCPP_HAS_NO_STDIN
|
|
using ::getchar;
|
|
#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_MSVCRT)
|
|
using ::gets;
|
|
#endif
|
|
using ::scanf;
|
|
using ::vscanf;
|
|
#endif
|
|
|
|
#ifndef _LIBCPP_HAS_NO_STDOUT
|
|
using ::printf;
|
|
using ::putchar;
|
|
using ::puts;
|
|
using ::vprintf;
|
|
#endif
|
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
#endif // _LIBCPP_CSTDIO
|