452 static void die(); |
452 static void die(); |
453 |
453 |
454 // File i/o operations |
454 // File i/o operations |
455 static const int default_file_open_flags(); |
455 static const int default_file_open_flags(); |
456 static int open(const char *path, int oflag, int mode); |
456 static int open(const char *path, int oflag, int mode); |
|
457 static FILE* open(int fd, const char* mode); |
457 static int close(int fd); |
458 static int close(int fd); |
458 static jlong lseek(int fd, jlong offset, int whence); |
459 static jlong lseek(int fd, jlong offset, int whence); |
459 static char* native_path(char *path); |
460 static char* native_path(char *path); |
460 static int ftruncate(int fd, jlong length); |
461 static int ftruncate(int fd, jlong length); |
461 static int fsync(int fd); |
462 static int fsync(int fd); |
475 |
476 |
476 // Dynamic library extension |
477 // Dynamic library extension |
477 static const char* dll_file_extension(); |
478 static const char* dll_file_extension(); |
478 |
479 |
479 static const char* get_temp_directory(); |
480 static const char* get_temp_directory(); |
480 static const char* get_current_directory(char *buf, int buflen); |
481 static const char* get_current_directory(char *buf, size_t buflen); |
481 |
482 |
482 // Builds a platform-specific full library path given a ld path and lib name |
483 // Builds a platform-specific full library path given a ld path and lib name |
483 // Returns true if buffer contains full path to existing file, false otherwise |
484 // Returns true if buffer contains full path to existing file, false otherwise |
484 static bool dll_build_name(char* buffer, size_t size, |
485 static bool dll_build_name(char* buffer, size_t size, |
485 const char* pathname, const char* fname); |
486 const char* pathname, const char* fname); |