Changeset bc56f30 in mainline for uspace/lib/c/include/stdlib.h


Ignore:
Timestamp:
2019-05-27T12:38:26Z (5 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:
0d14c25
Parents:
4d51c60
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-13 16:06:49)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-05-27 12:38:26)
Message:

Make some libc and libposix headers usable in C++

These headers either get included from standard C++ headers,
or are standard themselves, which means any unnamespaced nonstandard
identifiers are a problem. This commit attempts to fix those
issues, and removes hacks previously used in libcpp to work around it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/stdlib.h

    r4d51c60 rbc56f30  
    3636#define _LIBC_STDLIB_H_
    3737
    38 #ifdef __cplusplus
    39 extern "C" {
    40 #endif
    41 
    4238#include <_bits/size_t.h>
    4339#include <_bits/wchar_t.h>
     40#include <_bits/decls.h>
    4441#include <bsearch.h>
    4542#include <malloc.h>
    4643#include <qsort.h>
     44
     45#define EXIT_SUCCESS 0
     46#define EXIT_FAILURE 1
     47
     48#define RAND_MAX  714025
     49
     50#define MB_CUR_MAX 4
     51
     52__C_DECLS_BEGIN;
    4753
    4854/** Type returned by the div function */
     
    6975        long long rem;
    7076} lldiv_t;
    71 
    72 #define EXIT_FAILURE 1
    73 #define EXIT_SUCCESS 0
    74 
    75 #define RAND_MAX  714025
    76 
    77 #define MB_CUR_MAX 4
    7877
    7978extern long double strtold(const char *, char **);
     
    109108extern lldiv_t lldiv(long long, long long);
    110109
    111 #ifdef __cplusplus
    112 }
    113 #endif
     110__C_DECLS_END;
    114111
    115112#endif
Note: See TracChangeset for help on using the changeset viewer.