Changeset ceebf0a in mainline


Ignore:
Timestamp:
2011-06-09T15:48:24Z (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:
09b0b1fb
Parents:
ae1c11b
Message:

Add stubs for strtod() family of functions. Use not_implemented macro in stdlib.c

Location:
uspace/lib/posix
Files:
2 edited

Legend:

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

    rae1c11b rceebf0a  
    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();
    72111}
    73112
  • uspace/lib/posix/stdlib.h

    rae1c11b rceebf0a  
    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
    6167#ifndef LIBPOSIX_INTERNAL
    6268        #define qsort posix_qsort
    6369        #define getenv posix_getenv
    6470        #define realpath posix_realpath
     71       
     72        #define strtof posix_strtof
     73        #define strtod posix_strtod
     74        #define strtold posix_strtold
    6575#endif
    6676
Note: See TracChangeset for help on using the changeset viewer.