Changeset f2a45d9 in mainline


Ignore:
Timestamp:
2011-06-09T16:18:19Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
98a0fd3
Parents:
4ac901c (diff), 9536e6e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge libposix again.

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

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/Makefile

    r4ac901c rf2a45d9  
    4040SOURCES = \
    4141        ctype.c \
     42        stdio.c \
    4243        stdlib.c \
    4344        string.c \
  • uspace/lib/posix/stdio.h

    r4ac901c rf2a45d9  
    3333
    3434#define putc fputc
     35#define getc fgetc
     36
     37
     38extern FILE *posix_freopen(const char *restrict filename,
     39                           const char *restrict mode,
     40                           FILE *restrict stream);
     41
     42extern void posix_perror(const char *s);
     43
     44#ifndef POSIX_INTERNAL
     45        #define freopen posix_freopen
     46        #define perror posix_perror
     47#endif
    3548
    3649#endif /* POSIX_STDIO_H_ */
  • uspace/lib/posix/stdlib.c

    r4ac901c rf2a45d9  
    11/*
    22 * Copyright (c) 2011 Petr Koupy
     3 * Copyright (c) 2011 Jiri Zarevucky
    34 * All rights reserved.
    45 *
     
    3637
    3738#include "stdlib.h"
     39#include "common.h"
    3840
    3941/**
     
    4749{
    4850        // TODO
     51        not_implemented();
    4952}
    5053
     
    5760{
    5861        // TODO
    59         return 0;
     62        not_implemented();
    6063}
    6164
     
    6972{
    7073        // TODO
    71         return 0;
     74        not_implemented();
     75}
     76
     77/**
     78 *
     79 * @param nptr
     80 * @param endptr
     81 * @return
     82 */
     83float posix_strtof(const char *restrict nptr, char **restrict endptr)
     84{
     85        // TODO
     86        not_implemented();
     87}
     88
     89/**
     90 *
     91 * @param nptr
     92 * @param endptr
     93 * @return
     94 */
     95double posix_strtod(const char *restrict nptr, char **restrict endptr)
     96{
     97        // TODO
     98        not_implemented();
     99}
     100
     101/**
     102 *
     103 * @param nptr
     104 * @param endptr
     105 * @return
     106 */
     107long double posix_strtold(const char *restrict nptr, char **restrict endptr)
     108{
     109        // TODO
     110        not_implemented();
     111}
     112
     113/**
     114 *
     115 * @param str
     116 * @return
     117 */
     118int posix_atoi(const char *str)
     119{
     120        // TODO
     121        not_implemented();
    72122}
    73123
  • uspace/lib/posix/stdlib.h

    r4ac901c rf2a45d9  
    11/*
    22 * Copyright (c) 2011 Petr Koupy
     3 * Copyright (c) 2011 Jiri Zarevucky
    34 * All rights reserved.
    45 *
     
    5960extern char *posix_realpath(const char *restrict name, char *restrict resolved);
    6061
     62/* decimal to native floating point conversion */
     63extern float posix_strtof(const char *restrict nptr, char **restrict endptr);
     64extern double posix_strtod(const char *restrict nptr, char **restrict endptr);
     65extern long double posix_strtold(const char *restrict nptr, char **restrict endptr);
     66
     67/* decimal to native integer conversion */
     68extern int posix_atoi(const char *str);
     69
    6170#ifndef LIBPOSIX_INTERNAL
    6271        #define qsort posix_qsort
    6372        #define getenv posix_getenv
    6473        #define realpath posix_realpath
     74       
     75        #define strtof posix_strtof
     76        #define strtod posix_strtod
     77        #define strtold posix_strtold
     78       
     79        #define atoi posix_atoi
    6580#endif
    6681
Note: See TracChangeset for help on using the changeset viewer.