Changeset 820104d in mainline


Ignore:
Timestamp:
2013-10-12T14:45:31Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c2a6983
Parents:
970c4d8
Message:

libposix: do not die in unimplemented function, just warn

Location:
uspace/lib/posix/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/internal/common.h

    r970c4d8 r820104d  
    3939#include <stdlib.h>
    4040
    41 #define not_implemented() (fprintf(stderr, \
    42     "Function %s() in file %s at line %d is not implemented\n", \
    43     __func__, __FILE__, __LINE__), abort())
     41#define not_implemented() do { \
     42                static int __not_implemented_counter = 0; \
     43                if (__not_implemented_counter == 0) { \
     44                        fprintf(stderr, "%s() not implemented in %s:%d, something will NOT work.\n", \
     45                                __func__, __FILE__, __LINE__); \
     46                } \
     47                __not_implemented_counter++; \
     48        } while (0)
    4449
    4550/* A little helper macro to avoid typing this over and over. */
  • uspace/lib/posix/source/math.c

    r970c4d8 r820104d  
    4949        // TODO: low priority, just a compile-time dependency of binutils
    5050        not_implemented();
     51        return 0.0;
    5152}
    5253
     
    6162        // TODO: low priority, just a compile-time dependency of binutils
    6263        not_implemented();
     64        return 0.0;
    6365}
    6466
     
    7274        // TODO: Python dependency
    7375        not_implemented();
     76        return 0.0;
    7477}
    7578
     
    8487        // TODO: Python dependency
    8588        not_implemented();
     89        return 0.0;
    8690}
    8791
     
    9599        // TODO: Python dependency
    96100        not_implemented();
     101        return 0.0;
    97102}
    98103
     
    106111        // TODO: Python dependency
    107112        not_implemented();
     113        return 0.0;
    108114}
    109115
     
    118124        // TODO: Python dependency
    119125        not_implemented();
     126        return 0.0;
    120127}
    121128
     
    130137        // TODO: Python dependency
    131138        not_implemented();
     139        return 0.0;
    132140}
    133141
     
    141149        // TODO: Python dependency
    142150        not_implemented();
     151        return 0.0;
    143152}
    144153
     
    153162        // TODO: Python dependency
    154163        not_implemented();
     164        return 0.0;
    155165}
    156166
     
    164174        // TODO: Python dependency
    165175        not_implemented();
     176        return 0.0;
    166177}
    167178
     
    175186        // TODO: Python dependency
    176187        not_implemented();
     188        return 0.0;
    177189}
    178190
     
    186198        // TODO: Python dependency
    187199        not_implemented();
     200        return 0.0;
    188201}
    189202
  • uspace/lib/posix/source/stdlib.c

    r970c4d8 r820104d  
    6363        // TODO: low priority, just a compile-time dependency of binutils
    6464        not_implemented();
    65         return 1;
     65        return 0;
    6666}
    6767
  • uspace/lib/posix/source/unistd.c

    r970c4d8 r820104d  
    389389        // TODO: low priority, just a compile-time dependency of binutils
    390390        not_implemented();
     391        return -1;
    391392}
    392393
     
    399400        // TODO: low priority, just a compile-time dependency of binutils
    400401        not_implemented();
     402        return -1;
    401403}
    402404
     
    411413        // TODO: low priority, just a compile-time dependency of binutils
    412414        not_implemented();
     415        return -1;
    413416}
    414417
     
    423426        // TODO: low priority, just a compile-time dependency of binutils
    424427        not_implemented();
     428        return -1;
    425429}
    426430
     
    434438        // TODO: low priority, just a compile-time dependency of binutils
    435439        not_implemented();
     440        return -1;
    436441}
    437442
Note: See TracChangeset for help on using the changeset viewer.