274
278
/* Prototypes for mysys and my_func functions */
276
280
extern int my_copy(const char *from,const char *to,myf MyFlags);
277
extern int my_delete(const char *name,myf MyFlags);
278
extern int my_open(const char *FileName,int Flags,myf MyFlags);
281
DRIZZLED_API int my_delete(const char *name,myf MyFlags);
282
DRIZZLED_API int my_open(const char *FileName,int Flags,myf MyFlags);
279
283
extern int my_register_filename(int fd, const char *FileName,
280
uint32_t error_message_number, myf MyFlags);
281
extern int my_create(const char *FileName,int CreateFlags,
282
int AccessFlags, myf MyFlags);
283
extern int my_close(int Filedes,myf MyFlags);
284
uint32_t error_message_number, myf MyFlags);
285
DRIZZLED_API int my_create(const char *FileName,int CreateFlags,
286
int AccessFlags, myf MyFlags);
287
DRIZZLED_API int my_close(int Filedes,myf MyFlags);
284
288
extern int my_mkdir(const char *dir, int Flags, myf MyFlags);
285
289
extern int my_realpath(char *to, const char *filename, myf MyFlags);
286
290
extern int my_create_with_symlink(const char *linkname, const char *filename,
287
int createflags, int access_flags,
289
extern int my_delete_with_symlink(const char *name, myf MyFlags);
291
int createflags, int access_flags,
293
DRIZZLED_API int my_delete_with_symlink(const char *name, myf MyFlags);
290
294
extern int my_rename_with_symlink(const char *from,const char *to,myf MyFlags);
291
extern size_t my_read(int Filedes,unsigned char *Buffer,size_t Count,myf MyFlags);
292
extern int my_rename(const char *from,const char *to,myf MyFlags);
293
extern size_t my_write(int Filedes,const unsigned char *Buffer,size_t Count,
295
DRIZZLED_API size_t my_read(int Filedes,unsigned char *Buffer,size_t Count,myf MyFlags);
296
DRIZZLED_API int my_rename(const char *from, const char *to,myf MyFlags);
297
DRIZZLED_API size_t my_write(int Filedes, const unsigned char *Buffer,
298
size_t Count, myf MyFlags);
295
299
extern int _sanity(const char *sFile, uint32_t uLine);
297
301
extern int check_if_legal_filename(const char *path);
298
302
extern int check_if_legal_tablename(const char *path);
300
#define my_delete_allow_opened(fname,flags) my_delete((fname),(flags))
302
extern int my_sync(int fd, myf my_flags);
304
DRIZZLED_API int my_sync(int fd, myf my_flags);
303
305
extern int my_sync_dir(const char *dir_name, myf my_flags);
304
306
extern int my_sync_dir_by_file(const char *file_name, myf my_flags);
305
307
extern bool my_init(void);
317
319
extern char *convert_dirname(char *to, const char *from, const char *from_end);
318
320
extern char * fn_ext(const char *name);
319
321
extern char * fn_same(char * toname,const char *name,int flag);
320
extern char * fn_format(char * to,const char *name,const char *dir,
321
const char *form, uint32_t flag);
322
DRIZZLED_API char * fn_format(char * to,const char *name,const char *dir,
323
const char *form, uint32_t flag);
322
324
extern size_t strlength(const char *str);
323
325
extern size_t unpack_dirname(char * to,const char *from);
324
326
extern size_t unpack_filename(char * to,const char *from);
354
356
extern void my_qsort2(void *base_ptr, size_t total_elems, size_t size,
355
357
qsort2_cmp cmp, void *cmp_argument);
356
358
extern qsort2_cmp get_ptr_compare(size_t);
357
void my_store_ptr(unsigned char *buff, size_t pack_length, my_off_t pos);
358
my_off_t my_get_ptr(unsigned char *ptr, size_t pack_length);
359
DRIZZLED_API void my_store_ptr(unsigned char *buff, size_t pack_length, my_off_t pos);
360
DRIZZLED_API my_off_t my_get_ptr(unsigned char *ptr, size_t pack_length);
359
361
int create_temp_file(char *to, const char *dir, const char *pfx, myf MyFlags);
361
363
extern int get_defaults_options(int argc, char **argv,