Changeset cc3652db in mainline for uspace/lib/posix/stdlib.h


Ignore:
Timestamp:
2011-06-25T13:59:44Z (14 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:
be64a84
Parents:
2b83add
Message:

Add a few functions to stdlib.h

File:
1 edited

Legend:

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

    r2b83add rcc3652db  
    5656extern long long posix_llabs(long long i);
    5757
    58 /* Array Sort Function */
     58/* Integer division */
     59
     60typedef struct {
     61        int quot, rem;
     62} posix_div_t;
     63
     64typedef struct {
     65        long quot, rem;
     66} posix_ldiv_t;
     67
     68typedef struct {
     69        long long quot, rem;
     70} posix_lldiv_t;
     71
     72extern posix_div_t posix_div(int numer, int denom);
     73extern posix_ldiv_t posix_ldiv(long numer, long denom);
     74extern posix_lldiv_t posix_lldiv(long long numer, long long denom);
     75
     76/* Array Functions */
    5977extern void posix_qsort(void *array, size_t count, size_t size,
    6078    int (*compare)(const void *, const void *));
     79extern void *posix_bsearch(const void *key, const void *base,
     80    size_t nmemb, size_t size, int (*compar)(const void *, const void *));
     81
    6182
    6283/* Environment Access */
    6384extern char *posix_getenv(const char *name);
    6485extern int posix_putenv(char *string);
     86
     87extern int posix_system(const char *string);
     88
    6589
    6690/* Symbolic Links */
     
    104128        #define llabs posix_llabs
    105129
     130        #define div_t posix_div_t
     131        #define ldiv_t posix_ldiv_t
     132        #define lldiv_t posix_lldiv_t
     133        #define div posix_div
     134        #define ldiv posix_ldiv
     135        #define lldiv posix_lldiv
     136
    106137        #define qsort posix_qsort
     138        #define bsearch posix_bsearch
    107139
    108140        #define getenv posix_getenv
    109141        #define putenv posix_putenv
     142        #define system posix_system
    110143
    111144        #define realpath posix_realpath
Note: See TracChangeset for help on using the changeset viewer.