Changeset 59f799b in mainline


Ignore:
Timestamp:
2011-06-16T19:42:22Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
39a7bfa
Parents:
491e1ee
Message:

Added function stubs into stdio.h and unistd.h.

Location:
uspace/lib/posix
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdio.c

    r491e1ee r59f799b  
    4747 */
    4848#include "../c/generic/private/stdio.h"
     49
     50/**
     51 *
     52 * @param c
     53 * @param stream
     54 * @return
     55 */
     56int posix_ungetc(int c, FILE *stream)
     57{
     58        // TODO
     59        not_implemented();
     60}
    4961
    5062/**
     
    135147}
    136148
     149/**
     150 *
     151 * @param s
     152 * @param format
     153 * @param ...
     154 * @return
     155 */
     156int posix_sprintf(char *s, const char *format, ...)
     157{
     158        // TODO
     159        not_implemented();
     160}
     161
     162/**
     163 *
     164 * @param s
     165 * @param format
     166 * @param ...
     167 * @return
     168 */
     169int posix_sscanf(const char *s, const char *format, ...)
     170{
     171        // TODO
     172        not_implemented();
     173}
     174
    137175/** @}
    138176 */
  • uspace/lib/posix/stdio.h

    r491e1ee r59f799b  
    4343#define putc fputc
    4444#define getc fgetc
     45extern int posix_ungetc(int c, FILE *stream);
    4546
    4647/* Opening Streams */
     
    5758extern posix_off_t posix_ftello(FILE *stream);
    5859
     60/* Formatted Input/Output */
     61extern int posix_sprintf(char *restrict s, const char *restrict format, ...);
     62extern int posix_sscanf(const char *restrict s, const char *restrict format, ...);
     63
    5964#ifndef LIBPOSIX_INTERNAL
     65        #define ungetc posix_ungetc
     66
    6067        #define freopen posix_freopen
    6168
     
    6471        #define fseeko posix_fseeko
    6572        #define ftello posix_ftello
     73
     74        #define sprintf posix_sprintf
     75        #define sscanf posix_sscanf
    6676#endif
    6777
  • uspace/lib/posix/unistd.c

    r491e1ee r59f799b  
    5151
    5252/**
     53 *
     54 * @return
     55 */
     56posix_uid_t posix_getuid(void)
     57{
     58        // TODO
     59        not_implemented();
     60}
     61
     62/**
     63 *
     64 * @return
     65 */
     66posix_gid_t posix_getgid(void)
     67{
     68        // TODO
     69        not_implemented();
     70}
     71
     72/**
    5373 *
    5474 * @param path
     
    6282}
    6383
     84/**
     85 *
     86 * @param name
     87 * @return
     88 */
     89long posix_sysconf(int name)
     90{
     91        // TODO
     92        not_implemented();
     93}
     94
    6495/** @}
    6596 */
  • uspace/lib/posix/unistd.h

    r491e1ee r59f799b  
    3838
    3939#include "libc/unistd.h"
     40#include "sys/types.h"
    4041
    4142/* Process Termination */
     
    5253/* Process Identification */
    5354#define getpid task_get_id
     55extern posix_uid_t posix_getuid(void);
     56extern posix_gid_t posix_getgid(void);
    5457
    5558/* Standard Streams */
     
    7275extern int posix_access(const char *path, int amode);
    7376
     77/* System Parameters */
     78enum {
     79        _SC_PHYS_PAGES,
     80        _SC_AVPHYS_PAGES,
     81        _SC_PAGESIZE,
     82        _SC_CLK_TCK
     83};
     84extern long posix_sysconf(int name);
     85
    7486#ifndef LIBPOSIX_INTERNAL
    7587        #define isatty posix_isatty
    7688
     89        #define getuid posix_getuid
     90        #define getgid posix_getgid
     91
    7792        #define access posix_access
     93
     94        #define sysconf posix_sysconf
    7895#endif
    7996
Note: See TracChangeset for help on using the changeset viewer.