1
0
Fork 0
forked from nuttx/nuttx-update

Addings to stdlib.h must be added to cstdlib too

This commit is contained in:
Gregory Nutt 2015-08-14 12:04:57 -06:00
parent eb19e0c0e2
commit 8f7453b5ec
2 changed files with 21 additions and 6 deletions

View file

@ -1,7 +1,7 @@
//*************************************************************************** //***************************************************************************
// include/cxx/cstdlib // include/cxx/cstdlib
// //
// Copyright (C) 2009, 2012 Gregory Nutt. All rights reserved. // Copyright (C) 2009, 2012, 2015 Gregory Nutt. All rights reserved.
// Author: Gregory Nutt <gnutt@nuttx.org> // Author: Gregory Nutt <gnutt@nuttx.org>
// //
// Redistribution and use in source and binary forms, with or without // Redistribution and use in source and binary forms, with or without
@ -100,15 +100,29 @@ namespace std
using ::calloc; using ::calloc;
using ::mallinfo; using ::mallinfo;
// Misc. // Arithmetic
using ::abs; using ::abs;
using ::labs; using ::labs;
#ifdef CONFIG_HAVE_LONG_LONG #ifdef CONFIG_HAVE_LONG_LONG
using ::llabs; using ::llabs;
#endif #endif
#ifdef CONFIG_CAN_PASS_STRUCTS
using ::div;
using ::ldiv;
#ifdef CONFIG_HAVE_LONG_LONG
using ::lldiv;
#endif
#endif
// Temporary files
using ::mktemp; using ::mktemp;
using ::mkstemp; using ::mkstemp;
// Sorting
using ::qsort; using ::qsort;
} }

View file

@ -203,6 +203,11 @@ FAR void *calloc(size_t, size_t);
/* Arithmetic */ /* Arithmetic */
int abs(int j); int abs(int j);
long int labs(long int j);
#ifdef CONFIG_HAVE_LONG_LONG
long long int llabs(long long int j);
#endif
#ifdef CONFIG_CAN_PASS_STRUCTS #ifdef CONFIG_CAN_PASS_STRUCTS
div_t div(int numer, int denom); div_t div(int numer, int denom);
ldiv_t ldiv(long numer, long denom); ldiv_t ldiv(long numer, long denom);
@ -210,10 +215,6 @@ ldiv_t ldiv(long numer, long denom);
lldiv_t lldiv(long long numer, long long denom); lldiv_t lldiv(long long numer, long long denom);
#endif #endif
#endif #endif
long int labs(long int j);
#ifdef CONFIG_HAVE_LONG_LONG
long long int llabs(long long int j);
#endif
/* Temporary files */ /* Temporary files */