Changeset 04b687b in mainline for uspace/lib/libc


Ignore:
Timestamp:
2008-12-29T11:17:44Z (17 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
63088cc1
Parents:
8b74af07
Message:

Some ANSI C stream functions (stdio).

Location:
uspace/lib/libc
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/Makefile

    r8b74af07 r04b687b  
    6161        generic/io/io.c \
    6262        generic/io/printf.c \
     63        generic/io/stdio.c \
    6364        generic/io/stream.c \
    6465        generic/io/sprintf.c \
  • uspace/lib/libc/generic/libc.c

    r8b74af07 r04b687b  
    5454extern int main(int argc, char *argv[]);
    5555
     56int _errno;
     57
    5658void _exit(int status)
    5759{
  • uspace/lib/libc/include/errno.h

    r8b74af07 r04b687b  
    3636#define LIBC_ERRNO_H_
    3737
     38/* TODO: support threads/fibrils */
     39extern int _errno;
     40#define errno _errno
     41
    3842#include <kernel/errno.h>
    3943
  • uspace/lib/libc/include/stdio.h

    r8b74af07 r04b687b  
    5353}
    5454
     55typedef struct {
     56        /** Underlying file descriptor. */
     57        int fd;
     58
     59        /** Error indicator. */
     60        int error;
     61
     62        /** End-of-file indicator. */
     63        int eof;
     64} FILE;
     65
    5566extern int getchar(void);
    5667
     
    7182extern int rename(const char *, const char *);
    7283
     84extern FILE *fopen(const char *, const char *);
     85extern int fclose(FILE *);
     86extern size_t fread(void *, size_t, size_t, FILE *);
     87extern size_t fwrite(const void *, size_t, size_t, FILE *);
     88extern int feof(FILE *);
     89extern int ferror(FILE *);
     90extern void clearerr(FILE *);
     91
    7392#endif
    7493
Note: See TracChangeset for help on using the changeset viewer.