~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/my_sys.h

  • Committer: Monty Taylor
  • Date: 2008-12-07 23:42:51 UTC
  • mto: This revision was merged to the branch mainline in revision 670.
  • Revision ID: monty@inaugust.com-20081207234251-yxtbg06jpylwej29
Finally removed all of the my_malloc stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
#define MY_REDEL_MAKE_BACKUP 256
64
64
#define MY_SEEK_NOT_DONE 32     /* my_lock may have to do a seek */
65
65
#define MY_DONT_WAIT    64      /* my_lock() don't wait if can't lock */
66
 
#define MY_ZEROFILL     32      /* my_malloc(), fill array with zero */
67
 
#define MY_ALLOW_ZERO_PTR 64    /* my_realloc() ; zero ptr -> malloc */
68
 
#define MY_FREE_ON_ERROR 128    /* my_realloc() ; Free old ptr on error */
69
 
#define MY_HOLD_ON_ERROR 256    /* my_realloc() ; Return old ptr on error */
 
66
#define MY_ZEROFILL     32      /* my_multi_malloc(), fill array with zero */
70
67
#define MY_DONT_OVERWRITE_FILE 1024     /* my_copy: Don't overwrite file */
71
68
#define MY_THREADSAFE 2048      /* my_seek(): lock fd mutex */
72
69
 
140
137
typedef int  (*qsort_cmp)(const void *,const void *);
141
138
typedef int  (*qsort_cmp2)(void*, const void *,const void *);
142
139
 
143
 
extern void *my_malloc(size_t Size,myf MyFlags);
144
 
extern void *my_realloc(void *oldpoint, size_t Size, myf MyFlags);
145
 
extern void my_no_flags_free(void *ptr);
146
 
extern void *my_memdup(const void *from,size_t length,myf MyFlags);
147
 
extern char *my_strdup(const char *from,myf MyFlags);
148
 
extern char *my_strndup(const char *from, size_t length,
149
 
                                   myf MyFlags);
150
140
#define TRASH(A,B) /* nothing */
151
141
 
152
142
#ifndef errno                           /* did we already get it? */
367
357
extern void * my_multi_malloc (myf MyFlags, ...);
368
358
extern void _myfree(void *pPtr, const char *sFile, uint32_t uLine, myf MyFlag);
369
359
extern int _sanity(const char *sFile, uint32_t uLine);
370
 
extern void *_my_memdup(const void *from, size_t length,
371
 
                        const char *sFile, uint32_t uLine,myf MyFlag);
372
 
extern char * _my_strdup(const char *from, const char *sFile, uint32_t uLine,
373
 
                         myf MyFlag);
374
 
extern char *_my_strndup(const char *from, size_t length,
375
 
                         const char *sFile, uint32_t uLine,
376
 
                         myf MyFlag);
377
360
 
378
361
#define my_access access
379
362
extern int check_if_legal_filename(const char *path);