mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Fixed the header files I broke by mistake.
- You can now request that your program uses the clib2 alloca() function rather than the built-in compiler alloca(). - alloca() is now part of libunix.a, too. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15072 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: stdlib.h,v 1.13 2005-11-27 09:51:45 obarthel Exp $
|
||||
* $Id: stdlib.h,v 1.14 2005-11-27 10:28:15 obarthel Exp $
|
||||
*
|
||||
* :ts=4
|
||||
*
|
||||
@ -30,12 +30,12 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
****************************************************************************/
|
||||
*****************************************************************************
|
||||
*
|
||||
* Documentation and source code for this library, and the most recent library
|
||||
* build are available from <http://sourceforge.net/projects/clib2>.
|
||||
*
|
||||
****************************************************************************/
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef _STDLIB_H
|
||||
@ -160,6 +160,14 @@ extern int rand_r(unsigned int * seed);
|
||||
|
||||
/****************************************************************************/
|
||||
|
||||
/*
|
||||
* You can request to use the alloca() variant that actually does allocate
|
||||
* memory from the system rather than the current stack frame, which will
|
||||
* ease stack requirements but may not release allocate memory immediately.
|
||||
* In order to do so, add #define __USE_CLIB2_ALLOCA to your program, or
|
||||
* -D__USE_CLIB2_ALLOCA to your build makefile.
|
||||
*/
|
||||
|
||||
#if defined(__GNUC__) && !defined(__USE_CLIB2_ALLOCA)
|
||||
#undef alloca
|
||||
#define alloca(size) __builtin_alloca(size)
|
||||
|
||||
Reference in New Issue
Block a user