Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset bc1b297 in mainline


Ignore:
Timestamp:
2018-01-15T21:40:49Z (4 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
Children:
d8023313
Parents:
1848f8e
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:20:07)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:40:49)
Message:

Hide nonstandard symbols in <stdio.h> behind _HELENOS_SOURCE.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/stdio.h

    r1848f8e rbc1b297  
    5858#define BUFSIZ  4096
    5959
    60 enum _buffer_type {
    61         /** No buffering */
    62         _IONBF,
    63         /** Line buffering */
    64         _IOLBF,
    65         /** Full buffering */
    66         _IOFBF
    67 };
    68 
    69 enum _buffer_state {
    70         /** Buffer is empty */
    71         _bs_empty,
    72 
    73         /** Buffer contains data to be written */
    74         _bs_write,
    75 
    76         /** Buffer contains prefetched data for reading */
    77         _bs_read
    78 };
    79 
    8060/** Forward declaration */
    8161struct _IO_FILE;
     
    9171
    9272extern int getchar(void);
    93 extern char *gets(char *, size_t);
    9473
    9574/* Character and string output functions */
     
    11897extern int vsnprintf(char *, size_t, const char *, va_list);
    11998
    120 extern int printf_size(const char *, ...)
    121     _HELENOS_PRINTF_ATTRIBUTE(1, 2);
    122 extern int vprintf_size(const char *, va_list);
    123 
    12499/* File stream functions */
    125100extern FILE *fopen(const char *, const char *);
    126 extern FILE *fdopen(int, const char *);
    127101extern FILE *freopen(const char *, const char *, FILE *);
    128102extern int fclose(FILE *);
     
    135109extern long ftell(FILE *);
    136110extern int feof(FILE *);
    137 extern int fileno(FILE *);
    138111
    139112extern int fflush(FILE *);
     
    148121extern int remove(const char *);
    149122
     123#ifndef _HELENOS_SOURCE
     124#define _IONBF 0
     125#define _IOLBF 1
     126#define _IOFBF 2
     127#endif
     128
     129#ifdef _HELENOS_SOURCE
     130
     131/* Nonstandard extensions. */
     132
     133enum _buffer_type {
     134        /** No buffering */
     135        _IONBF,
     136        /** Line buffering */
     137        _IOLBF,
     138        /** Full buffering */
     139        _IOFBF
     140};
     141
     142enum _buffer_state {
     143        /** Buffer is empty */
     144        _bs_empty,
     145
     146        /** Buffer contains data to be written */
     147        _bs_write,
     148
     149        /** Buffer contains prefetched data for reading */
     150        _bs_read
     151};
     152
     153extern int vprintf_size(const char *, va_list);
     154extern int printf_size(const char *, ...)
     155    _HELENOS_PRINTF_ATTRIBUTE(1, 2);
     156extern FILE *fdopen(int, const char *);
     157extern int fileno(FILE *);
     158extern char *gets(char *, size_t);
     159
     160#endif
     161
     162
    150163#endif
    151164
Note: See TracChangeset for help on using the changeset viewer.