Changeset 09b0b1fb in mainline


Ignore:
Timestamp:
2011-06-09T16:06:07Z (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:
9536e6e
Parents:
ceebf0a
Message:

Add getc→fgetc alias, atoi(), freopen(), perror() stubs.

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

Legend:

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

    rceebf0a r09b0b1fb  
    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

    rceebf0a r09b0b1fb  
    111111}
    112112
     113/**
     114 *
     115 * @param str
     116 * @return
     117 */
     118int posix_atoi(const char *str)
     119{
     120        // TODO
     121        not_implemented();
     122}
     123
    113124/** @}
    114125 */
  • uspace/lib/posix/stdlib.h

    rceebf0a r09b0b1fb  
    6565extern long double posix_strtold(const char *restrict nptr, char **restrict endptr);
    6666
     67/* decimal to native integer conversion */
     68extern int posix_atoi(const char *str);
     69
    6770#ifndef LIBPOSIX_INTERNAL
    6871        #define qsort posix_qsort
     
    7376        #define strtod posix_strtod
    7477        #define strtold posix_strtold
     78       
     79        #define atoi posix_atoi
    7580#endif
    7681
Note: See TracChangeset for help on using the changeset viewer.