Changeset 45161b4d for src/libcfa/stdlib
- Timestamp:
- Apr 13, 2016, 5:08:56 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- b11fac4
- Parents:
- 3849857
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/stdlib
r3849857 r45161b4d 10 10 // Created On : Thu Jan 28 17:12:35 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Tue Apr 12 18:22:54201613 // Update Count : 7712 // Last Modified On : Wed Apr 13 14:45:53 2016 13 // Update Count : 85 14 14 // 15 15 … … 18 18 extern "C" { 19 19 #include <stddef.h> // size_t 20 #include <math.h> // floor21 20 } // extern "C" 22 21 22 //--------------------------------------- 23 24 extern "C" { 25 #ifndef EXIT_FAILURE 26 #define EXIT_FAILURE 1 // failing exit status 27 #define EXIT_SUCCESS 0 // successful exit status 28 #endif // ! EXIT_FAILURE 29 void exit( int rc ); 30 } // extern "C" 31 32 //--------------------------------------- 33 34 extern "C" { 35 void * malloc( size_t ); // use default C routine for void * 36 } // extern "C" 23 37 forall( otype T ) T * malloc( void ); 24 extern "C" {25 void * malloc( size_t ); // use default C for void *26 } // extern "C"27 forall( otype T ) T * malloc( size_t size );28 38 forall( otype T ) T * malloc( char fill ); 29 39 forall( otype T ) T * malloc( T * ptr, size_t size ); 30 40 forall( otype T ) T * malloc( T * ptr, size_t size, unsigned char fill ); 31 forall( otype T ) T * calloc( size_t size ); 41 extern "C" { 42 void * calloc( size_t nmemb, size_t size ); // use default C routine for void * 43 } // extern "C" 44 forall( otype T ) T * calloc( size_t nmemb ); 45 extern "C" { 46 void * realloc( void * ptr, size_t size ); // use default C routine for void * 47 } // extern "C" 32 48 forall( otype T ) T * realloc( T * ptr, size_t size ); 33 49 forall( otype T ) T * realloc( T * ptr, size_t size, unsigned char fill ); … … 85 101 char abs( char ); 86 102 extern "C" { 87 int abs( int ); // use default C routine for int103 int abs( int ); // use default C routine for int 88 104 } // extern "C" 89 105 long int abs( long int ); … … 100 116 float floor( float ); 101 117 extern "C" { 102 double floor( double ); // use C routine for double118 double floor( double ); // use C routine for double 103 119 } // extern "C" 104 120 long double floor( long double ); … … 106 122 float ceil( float ); 107 123 extern "C" { 108 double ceil( double ); // use C routine for double124 double ceil( double ); // use C routine for double 109 125 } // extern "C" 110 126 long double ceil( long double );
Note: See TracChangeset
for help on using the changeset viewer.