483 // that support such things. This calls shutdown() and then aborts.
484 static void abort(bool dump_core = true);
485
486 // Die immediately, no exit hook, no abort hook, no cleanup.
487 static void die();
488
489 // File i/o operations
490 static const int default_file_open_flags();
491 static int open(const char *path, int oflag, int mode);
492 static FILE* open(int fd, const char* mode);
493 static int close(int fd);
494 static jlong lseek(int fd, jlong offset, int whence);
495 static char* native_path(char *path);
496 static int ftruncate(int fd, jlong length);
497 static int fsync(int fd);
498 static int available(int fd, jlong *bytes);
499
500 //File i/o operations
501
502 static size_t read(int fd, void *buf, unsigned int nBytes);
503 static size_t restartable_read(int fd, void *buf, unsigned int nBytes);
504 static size_t write(int fd, const void *buf, unsigned int nBytes);
505
506 // Reading directories.
507 static DIR* opendir(const char* dirname);
508 static int readdir_buf_size(const char *path);
509 static struct dirent* readdir(DIR* dirp, dirent* dbuf);
510 static int closedir(DIR* dirp);
511
512 // Dynamic library extension
513 static const char* dll_file_extension();
514
515 static const char* get_temp_directory();
516 static const char* get_current_directory(char *buf, size_t buflen);
517
518 // Builds a platform-specific full library path given a ld path and lib name
519 // Returns true if buffer contains full path to existing file, false otherwise
520 static bool dll_build_name(char* buffer, size_t size,
521 const char* pathname, const char* fname);
522
|
483 // that support such things. This calls shutdown() and then aborts.
484 static void abort(bool dump_core = true);
485
486 // Die immediately, no exit hook, no abort hook, no cleanup.
487 static void die();
488
489 // File i/o operations
490 static const int default_file_open_flags();
491 static int open(const char *path, int oflag, int mode);
492 static FILE* open(int fd, const char* mode);
493 static int close(int fd);
494 static jlong lseek(int fd, jlong offset, int whence);
495 static char* native_path(char *path);
496 static int ftruncate(int fd, jlong length);
497 static int fsync(int fd);
498 static int available(int fd, jlong *bytes);
499
500 //File i/o operations
501
502 static size_t read(int fd, void *buf, unsigned int nBytes);
503 static size_t read_at(int fd, void *buf, unsigned int nBytes, jlong offset);
504 static size_t restartable_read(int fd, void *buf, unsigned int nBytes);
505 static size_t write(int fd, const void *buf, unsigned int nBytes);
506
507 // Reading directories.
508 static DIR* opendir(const char* dirname);
509 static int readdir_buf_size(const char *path);
510 static struct dirent* readdir(DIR* dirp, dirent* dbuf);
511 static int closedir(DIR* dirp);
512
513 // Dynamic library extension
514 static const char* dll_file_extension();
515
516 static const char* get_temp_directory();
517 static const char* get_current_directory(char *buf, size_t buflen);
518
519 // Builds a platform-specific full library path given a ld path and lib name
520 // Returns true if buffer contains full path to existing file, false otherwise
521 static bool dll_build_name(char* buffer, size_t size,
522 const char* pathname, const char* fname);
523
|