m01_C_aux_1onPage

m01_C_aux_1onPage - defined(OS2GCC) || defined(__FreeBSD__)...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion Predefined Macros GCC: __GNUC__ __STRICT_ANSI__ (When strict ANSI applied) __linux__ (On linux systems) __FreeBSD__ (Another variant of unix) __hp9000s700__ (HP workstations) CL (VC++): WIN32, _WINDOWS, _MSC_VER (Version number) NDEBUG (Release version) DEBUG, _DEBUG (Debug version)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion 10 Malloc / Free Macros #ifdef _DEBUG VoidPtr XXXXMalloc(unsigned Size, char *ObjType, char *FileName, int LineNum); #define XXXXMalloc(x) XXXXMalloc((x), #x, \ __FILE__, __LINE__) void XXXXFree(VoidPtr p); #define XXXXFree(x) { XXXXFree(x); x = NULL; } #else #define XXXXMalloc(Size) malloc(Size) #define XXXXFree(Ptr) free(Ptr) #endif /* _DEBUG */
Background image of page 2
bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion 11 MACRO examples # if defined(OSF1DEC) || defined(sgi) || defined(SUN4) || \
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: defined(OS2GCC) || defined(__FreeBSD__) # ifdef OSF1DEC # ifdef _XOPEN_SOURCE # undef _XOPEN_SOURCE /* For usleep */ # endif /* _XOPEN_SOURCE */ # endif /* OSF1DEC */ # include <unistd.h> # endif /* OSF1DEC || sgi || SUN4 || OS2GCC || FreeBSD */ # ifdef __WINNT__ # include <direct.h> # if _MSC_VER >= 1400 /* Visual 8, 2005 */ # define mkdir(Dir, Permit) _mkdir(Dir) # else # define mkdir(Dir, Permit) mkdir(Dir) # endif /* _MSC_VER >= 1400 */ # endif /* __WINNT__ */ bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion memcpy C function void *memcpy(void *dest, const void *src, int count); 12 bEgInSlIdE Copyright 1995 - 2007 C. Gotsman & Y.M. Kimchi, Computer Science Dept. Technion qsort C function void qsort(void *base_array, int num_elem, size_elem, int (*compare )(const void *, const void *)); 13...
View Full Document

This note was uploaded on 04/14/2011 for the course CS 234122 taught by Professor Gillbarequet during the Spring '11 term at Technion.

Page1 / 5

m01_C_aux_1onPage - defined(OS2GCC) || defined(__FreeBSD__)...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online