[Cbe-oss-dev] [PATCH 6/7] libspe2: Hide internal symbols: POSIX.1 handler

Kazunori Asayama asayama at sm.sony.co.jp
Thu Jul 19 23:22:34 EST 2007


This patch hides internal symbols in the POSIX.1 handler of
libspe2.

Signed-off-by: Kazunori Asayama <asayama at sm.sony.co.jp>

---
 spebase/default_posix1_handler.c |  140 +++++++++++++++++++--------------------
 spebase/default_posix1_handler.h |   70 -------------------
 spebase/lib_builtin.c            |    2 
 3 files changed, 72 insertions(+), 140 deletions(-)

Index: b/spebase/default_posix1_handler.c
===================================================================
--- a/spebase/default_posix1_handler.c	2007-07-12 16:59:43.000000000 +0900
+++ b/spebase/default_posix1_handler.c	2007-07-19 12:53:02.000000000 +0900
@@ -313,7 +313,7 @@ check_conv_spuvec(char *ls, struct iovec
  *
  *	int stat(const char *file_name, struct stat *buf)
  */
-int default_posix1_handler_stat(char *ls, unsigned long opdata)
+static int default_posix1_handler_stat(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -355,7 +355,7 @@ int default_posix1_handler_stat(char *ls
  *
  *      int fstat(int filedes, struct stat *buf)
  */
-int default_posix1_handler_fstat(char *ls, unsigned long opdata)
+static int default_posix1_handler_fstat(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -397,7 +397,7 @@ int default_posix1_handler_fstat(char *l
  *
  *      int lstat(const char *file_name, struct stat *buf)
  */
-int default_posix1_handler_lstat(char *ls, unsigned long opdata)
+static int default_posix1_handler_lstat(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -439,7 +439,7 @@ int default_posix1_handler_lstat(char *l
  *
  *	int open(const char *pathname, int flags, mode_t mode);
  */
-int default_posix1_handler_open(char *ls, unsigned long opdata)
+static int default_posix1_handler_open(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -467,7 +467,7 @@ int default_posix1_handler_open(char *ls
  *
  *	int access(const char *pathname, int mode);
  */
-int default_posix1_handler_access(char *ls, unsigned long opdata)
+static int default_posix1_handler_access(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -494,7 +494,7 @@ int default_posix1_handler_access(char *
  *
  *      int creat(const char *pathname, mode_t mode);
  */
-int default_posix1_handler_creat(char *ls, unsigned long opdata)
+static int default_posix1_handler_creat(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -520,7 +520,7 @@ int default_posix1_handler_creat(char *l
  *
  *	int close(int fd);
  */
-int default_posix1_handler_close(char *ls, unsigned long opdata)
+static int default_posix1_handler_close(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -544,7 +544,7 @@ int default_posix1_handler_close(char *l
  *
  *	int dup(int oldfd);
  */
-int default_posix1_handler_dup(char *ls, unsigned long opdata)
+static int default_posix1_handler_dup(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -568,7 +568,7 @@ int default_posix1_handler_dup(char *ls,
  *
  *	time_t time(time_t *t);
  */
-int default_posix1_handler_time(char *ls, unsigned long opdata)
+static int default_posix1_handler_time(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -593,7 +593,7 @@ int default_posix1_handler_time(char *ls
  *
  *	ssize_t read(int fd, void *buf, size_t count);
  */
-int default_posix1_handler_read(char *ls, unsigned long opdata)
+static int default_posix1_handler_read(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -621,7 +621,7 @@ int default_posix1_handler_read(char *ls
  *
  *	ssize_t write(int fd, const void *buf, size_t count);
  */
-int default_posix1_handler_write(char *ls, unsigned long opdata)
+static int default_posix1_handler_write(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -649,7 +649,7 @@ int default_posix1_handler_write(char *l
  *
  *	off_t lseek(int fildes, off_t offset, int whence);
  */
-int default_posix1_handler_lseek(char *ls, unsigned long opdata)
+static int default_posix1_handler_lseek(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -678,7 +678,7 @@ int default_posix1_handler_lseek(char *l
  *      int ftruncate(int fd, off_t length);
  * 
  */
-int default_posix1_handler_ftruncate(char *ls, unsigned long opdata)
+static int default_posix1_handler_ftruncate(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -704,7 +704,7 @@ int default_posix1_handler_ftruncate(cha
  *
  *      int unlink(const char *pathname);
  */
-int default_posix1_handler_unlink(char *ls, unsigned long opdata)
+static int default_posix1_handler_unlink(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -733,7 +733,7 @@ int default_posix1_handler_unlink(char *
  * rather than LS offsets.  On powerpc32 ABI (which is ILP-32), these 
  * are handled as 32b EA pointers.
  */
-int default_posix1_handler_mmap(char *ls, unsigned long opdata)
+static int default_posix1_handler_mmap(char *ls, unsigned long opdata)
 {
     DECL_6_ARGS();
     DECL_RET();
@@ -778,7 +778,7 @@ int default_posix1_handler_mmap(char *ls
  * For this interface, 'start' is taken to be an EA pointer
  * rather than an LS offset.
  */
-int default_posix1_handler_munmap(char *ls, unsigned long opdata)
+static int default_posix1_handler_munmap(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -809,7 +809,7 @@ int default_posix1_handler_munmap(char *
  * For this interface, both 'old_address' and the returned value
  * are taken to be EA pointers, rather than LS offsets.
  */
-int default_posix1_handler_mremap(char *ls, unsigned long opdata)
+static int default_posix1_handler_mremap(char *ls, unsigned long opdata)
 {
     DECL_4_ARGS();
     DECL_RET();
@@ -845,7 +845,7 @@ int default_posix1_handler_mremap(char *
  * For this interface, 'start' is taken to be an EA pointer
  * rather than an LS offset.
  */
-int default_posix1_handler_msync(char *ls, unsigned long opdata)
+static int default_posix1_handler_msync(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -877,7 +877,7 @@ int default_posix1_handler_msync(char *l
  * For this interface, the returned value is taken to be an
  * EA pointer rather than an LS offset.
  */
-int default_posix1_handler_shm_open(char *ls, unsigned long opdata)
+static int default_posix1_handler_shm_open(char *ls, unsigned long opdata)
 {
 #ifdef SPE_POSIX1_SHM_CALLS
     DECL_3_ARGS();
@@ -911,7 +911,7 @@ int default_posix1_handler_shm_open(char
  *
  *	int shm_unlink(const char *name);
  */
-int default_posix1_handler_shm_unlink(char *ls, unsigned long opdata)
+static int default_posix1_handler_shm_unlink(char *ls, unsigned long opdata)
 {
 #ifdef SPE_POSIX1_SHM_CALLS
     DECL_1_ARGS();
@@ -944,7 +944,7 @@ int default_posix1_handler_shm_unlink(ch
  * For this interface, both 'shmaddr' and the returned value are
  * taken to be EA pointers rather than LS offsets.
  */
-int default_posix1_handler_shmat(char *ls, unsigned long opdata)
+static int default_posix1_handler_shmat(char *ls, unsigned long opdata)
 {
 #ifdef SPE_POSIX1_SHM_CALLS
     DECL_3_ARGS();
@@ -983,7 +983,7 @@ int default_posix1_handler_shmat(char *l
  * For this interface 'shmaddr' is taken to be an EA pointer
  * rather than an LS offset.
  */
-int default_posix1_handler_shmdt(char *ls, unsigned long opdata)
+static int default_posix1_handler_shmdt(char *ls, unsigned long opdata)
 {
 #ifdef SPE_POSIX1_SHM_CALLS
     DECL_1_ARGS();
@@ -1017,7 +1017,7 @@ int default_posix1_handler_shmdt(char *l
  * For this interface 'buf' is taken to be an EA pointer rather
  * than an LS offset.
  */
-int default_posix1_handler_shmctl(char *ls, unsigned long opdata)
+static int default_posix1_handler_shmctl(char *ls, unsigned long opdata)
 {
 #ifdef SPE_POSIX1_SHM_CALLS
     DECL_3_ARGS();
@@ -1052,7 +1052,7 @@ int default_posix1_handler_shmctl(char *
  *
  *	int shmget(key_t key, int size, int shmflg);
  */
-int default_posix1_handler_shmget(char *ls, unsigned long opdata)
+static int default_posix1_handler_shmget(char *ls, unsigned long opdata)
 {
 #ifdef SPE_POSIX1_SHM_CALLS
     DECL_3_ARGS();
@@ -1089,7 +1089,7 @@ int default_posix1_handler_shmget(char *
  * For convenience, this function takes 'pathname' to be the LS 
  * offset of a NULL-terminated character string.
  */
-int default_posix1_handler_ftok(char *ls, unsigned long opdata)
+static int default_posix1_handler_ftok(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1115,7 +1115,7 @@ int default_posix1_handler_ftok(char *ls
  *
  *      int getpagesize(void);
  */
-int default_posix1_handler_getpagesize(char *ls, unsigned long opdata)
+static int default_posix1_handler_getpagesize(char *ls, unsigned long opdata)
 {
     DECL_0_ARGS();
     DECL_RET();
@@ -1137,7 +1137,7 @@ int default_posix1_handler_getpagesize(c
  *
  *      pid_t wait(int *status)
  */
-int default_posix1_handler_wait(char *ls, unsigned long opdata)
+static int default_posix1_handler_wait(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1161,7 +1161,7 @@ int default_posix1_handler_wait(char *ls
  *
  *      pid_t waitpid(pid_t pid, int *status, int options)
  */
-int default_posix1_handler_waitpid(char *ls, unsigned long opdata)
+static int default_posix1_handler_waitpid(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1188,7 +1188,7 @@ int default_posix1_handler_waitpid(char 
  *
  *      int kill(pid_t pid, int sig)
  */
-int default_posix1_handler_kill(char *ls, unsigned long opdata)
+static int default_posix1_handler_kill(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1238,7 +1238,7 @@ int default_posix1_handler_kill(char *ls
  *
  *      int adjtimex(struct timex *buf)
  */
-int default_posix1_handler_adjtimex(char *ls, unsigned long opdata)
+static int default_posix1_handler_adjtimex(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1267,7 +1267,7 @@ int default_posix1_handler_adjtimex(char
  *
  *      int gettimeofday(struct timeval *tv, struct timezone *tz)
  */
-int default_posix1_handler_gettimeofday(char *ls, unsigned long opdata)
+static int default_posix1_handler_gettimeofday(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1302,7 +1302,7 @@ int default_posix1_handler_gettimeofday(
  * Implement:
  *     int nanosleep(struct timespec *req, struct timespec *rem);
  */
-int default_posix1_handler_nanosleep(char *ls, unsigned long opdata)
+static int default_posix1_handler_nanosleep(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1341,7 +1341,7 @@ int default_posix1_handler_nanosleep(cha
  *     int chdir(const char *path)
  */
 
-int default_posix1_handler_chdir(char *ls, unsigned long opdata)
+static int default_posix1_handler_chdir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1363,7 +1363,7 @@ int default_posix1_handler_chdir(char *l
  * Implement:
  *     int fchdir(int fd)
  */
-int default_posix1_handler_fchdir(char *ls, unsigned long opdata)
+static int default_posix1_handler_fchdir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1385,7 +1385,7 @@ int default_posix1_handler_fchdir(char *
  * Implement:
  *     int mkdir(const char *pathname, mode_t mode)
  */
-int default_posix1_handler_mkdir(char *ls, unsigned long opdata)
+static int default_posix1_handler_mkdir(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1409,7 +1409,7 @@ int default_posix1_handler_mkdir(char *l
  * Implement:
  *     int mknod(const char *pathname, mode_t mode, dev_t dev)
  */
-int default_posix1_handler_mknod(char *ls, unsigned long opdata)
+static int default_posix1_handler_mknod(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1435,7 +1435,7 @@ int default_posix1_handler_mknod(char *l
  * Implement:
  *     int rmdir(const char *pathname)
  */
-int default_posix1_handler_rmdir(char *ls, unsigned long opdata)
+static int default_posix1_handler_rmdir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1457,7 +1457,7 @@ int default_posix1_handler_rmdir(char *l
  * Implement:
  *     int chmod(const char *path, mode_t mode)
  */
-int default_posix1_handler_chmod(char *ls, unsigned long opdata)
+static int default_posix1_handler_chmod(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1481,7 +1481,7 @@ int default_posix1_handler_chmod(char *l
  * Implement:
  *     int fchmod(int fildes, mode_t mode)
  */
-int default_posix1_handler_fchmod(char *ls, unsigned long opdata)
+static int default_posix1_handler_fchmod(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1505,7 +1505,7 @@ int default_posix1_handler_fchmod(char *
  * Implement:
  *     int chown(const char *path, uid_t owner, gid_t group)
  */
-int default_posix1_handler_chown(char *ls, unsigned long opdata)
+static int default_posix1_handler_chown(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1531,7 +1531,7 @@ int default_posix1_handler_chown(char *l
  * Implement:
  *     int fchown(int fd, uid_t owner, gid_t group)
  */
-int default_posix1_handler_fchown(char *ls, unsigned long opdata)
+static int default_posix1_handler_fchown(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1557,7 +1557,7 @@ int default_posix1_handler_fchown(char *
  * Implement:
  *     int lchown(const char *path, uid_t owner, gid_t group)
  */
-int default_posix1_handler_lchown(char *ls, unsigned long opdata)
+static int default_posix1_handler_lchown(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1583,7 +1583,7 @@ int default_posix1_handler_lchown(char *
  * Implement:
  *     char *getcwd(char *buf, size_t size)
  */
-int default_posix1_handler_getcwd(char *ls, unsigned long opdata)
+static int default_posix1_handler_getcwd(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1621,7 +1621,7 @@ int default_posix1_handler_getcwd(char *
  * Implement:
  *     int link(const char *oldpath, const char *newpath)
  */
-int default_posix1_handler_link(char *ls, unsigned long opdata)
+static int default_posix1_handler_link(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1645,7 +1645,7 @@ int default_posix1_handler_link(char *ls
  * Implement:
  *     int symlink(const char *oldpath, const char *newpath)
  */
-int default_posix1_handler_symlink(char *ls, unsigned long opdata)
+static int default_posix1_handler_symlink(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1669,7 +1669,7 @@ int default_posix1_handler_symlink(char 
  * Implement:
  *     ssize_t readlink(const char *path, char *buf, size_t bufsiz)
  */
-int default_posix1_handler_readlink(char *ls, unsigned long opdata)
+static int default_posix1_handler_readlink(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1695,7 +1695,7 @@ int default_posix1_handler_readlink(char
  * Implement:
  *      void sync(void)
  */
-int default_posix1_handler_sync(char *ls, unsigned long opdata)
+static int default_posix1_handler_sync(char *ls, unsigned long opdata)
 {
     DEBUG_PRINTF("%s\n", __func__);
     sync();
@@ -1710,7 +1710,7 @@ int default_posix1_handler_sync(char *ls
  * Implement:
  *      int fsync(int fd)
  */
-int default_posix1_handler_fsync(char *ls, unsigned long opdata)
+static int default_posix1_handler_fsync(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1732,7 +1732,7 @@ int default_posix1_handler_fsync(char *l
  * Implement:
  *      int fdatasync(int fd)
  */
-int default_posix1_handler_fdatasync(char *ls, unsigned long opdata)
+static int default_posix1_handler_fdatasync(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1754,7 +1754,7 @@ int default_posix1_handler_fdatasync(cha
  * Implement:
  *      int dup2(int oldfd, int newfd)
  */
-int default_posix1_handler_dup2(char *ls, unsigned long opdata)
+static int default_posix1_handler_dup2(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1778,7 +1778,7 @@ int default_posix1_handler_dup2(char *ls
  * Implement:
  *      int lockf(int fd, int cmd, off_t len)
  */
-int default_posix1_handler_lockf(char *ls, unsigned long opdata)
+static int default_posix1_handler_lockf(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -1804,7 +1804,7 @@ int default_posix1_handler_lockf(char *l
  * Implement:
  *      int truncate(const char *path, off_t length)
  */
-int default_posix1_handler_truncate(char *ls, unsigned long opdata)
+static int default_posix1_handler_truncate(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1828,7 +1828,7 @@ int default_posix1_handler_truncate(char
  * Implement:
  *      int mkstemp(char *template)
  */
-int default_posix1_handler_mkstemp(char *ls, unsigned long opdata)
+static int default_posix1_handler_mkstemp(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1850,7 +1850,7 @@ int default_posix1_handler_mkstemp(char 
  * Implement:
  *      char *mktemp(char *template)
  */
-int default_posix1_handler_mktemp(char *ls, unsigned long opdata)
+static int default_posix1_handler_mktemp(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1878,7 +1878,7 @@ int default_posix1_handler_mktemp(char *
  * Implement:
  *       DIR *opendir(const char *dirname);
  */
-int default_posix1_handler_opendir(char *ls, unsigned long opdata)
+static int default_posix1_handler_opendir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1902,7 +1902,7 @@ int default_posix1_handler_opendir(char 
  * Implement:
  *       DIR *closedir(const char *dirname);
  */
-int default_posix1_handler_closedir(char *ls, unsigned long opdata)
+static int default_posix1_handler_closedir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1925,7 +1925,7 @@ int default_posix1_handler_closedir(char
  * Implement:
  *       struct dirent *readdir(DIR *dir)
  */
-int default_posix1_handler_readdir(char *ls, unsigned long opdata)
+static int default_posix1_handler_readdir(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1956,7 +1956,7 @@ int default_posix1_handler_readdir(char 
  * Implement:
  *      void rewinddir(DIR *dir)
  */
-int default_posix1_handler_rewinddir(char *ls, unsigned long opdata)
+static int default_posix1_handler_rewinddir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -1977,7 +1977,7 @@ int default_posix1_handler_rewinddir(cha
  * Implement:
  *      void seekdir(DIR *dir)
  */
-int default_posix1_handler_seekdir(char *ls, unsigned long opdata)
+static int default_posix1_handler_seekdir(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -1999,7 +1999,7 @@ int default_posix1_handler_seekdir(char 
  *
  * Implement:
  */
-int default_posix1_handler_telldir(char *ls, unsigned long opdata)
+static int default_posix1_handler_telldir(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -2021,7 +2021,7 @@ int default_posix1_handler_telldir(char 
  * Implement:
  *      int sched_yield(void)
  */
-int default_posix1_handler_sched_yield(char *ls, unsigned long opdata)
+static int default_posix1_handler_sched_yield(char *ls, unsigned long opdata)
 {
     DECL_0_ARGS();
     DECL_RET();
@@ -2041,7 +2041,7 @@ int default_posix1_handler_sched_yield(c
  * Implement:
  *      mode_t umask(mode_t mask)
  */
-int default_posix1_handler_umask(char *ls, unsigned long opdata)
+static int default_posix1_handler_umask(char *ls, unsigned long opdata)
 {
     DECL_1_ARGS();
     DECL_RET();
@@ -2063,7 +2063,7 @@ int default_posix1_handler_umask(char *l
  * Implement:
  *     int utime(const char *filename, const struct utimbuf *buf)
  */
-int default_posix1_handler_utime(char *ls, unsigned long opdata)
+static int default_posix1_handler_utime(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -2090,7 +2090,7 @@ int default_posix1_handler_utime(char *l
  * Implement:
  *     int utimes(const char *filename, const struct timeval times[2])
  */
-int default_posix1_handler_utimes(char *ls, unsigned long opdata)
+static int default_posix1_handler_utimes(char *ls, unsigned long opdata)
 {
     DECL_2_ARGS();
     DECL_RET();
@@ -2119,7 +2119,7 @@ int default_posix1_handler_utimes(char *
  * Implement:
  *      ssize_t pread(int fd, void *buf, size_t count, off_t offset)
  */
-int default_posix1_handler_pread(char *ls, unsigned long opdata)
+static int default_posix1_handler_pread(char *ls, unsigned long opdata)
 {
     DECL_4_ARGS();
     DECL_RET();
@@ -2147,7 +2147,7 @@ int default_posix1_handler_pread(char *l
  * Implement:
  *      ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset)
  */
-int default_posix1_handler_pwrite(char *ls, unsigned long opdata)
+static int default_posix1_handler_pwrite(char *ls, unsigned long opdata)
 {
     DECL_4_ARGS();
     DECL_RET();
@@ -2177,7 +2177,7 @@ int default_posix1_handler_pwrite(char *
  * Implement:
  *      ssize_t readv(int fd, const struct iovec *vec, int count)
  */
-int default_posix1_handler_readv(char *ls, unsigned long opdata)
+static int default_posix1_handler_readv(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -2206,7 +2206,7 @@ int default_posix1_handler_readv(char *l
  * Implement:
  *      ssize_t writev(int fd, const struct iovec *vec, int count)
  */
-int default_posix1_handler_writev(char *ls, unsigned long opdata)
+static int default_posix1_handler_writev(char *ls, unsigned long opdata)
 {
     DECL_3_ARGS();
     DECL_RET();
@@ -2227,7 +2227,7 @@ int default_posix1_handler_writev(char *
     return 0;
 }
 
-int (*default_posix1_funcs[SPE_POSIX1_NR_OPCODES]) (char *, unsigned long) = {
+static int (*default_posix1_funcs[SPE_POSIX1_NR_OPCODES]) (char *, unsigned long) = {
 	[SPE_POSIX1_UNUSED]		= NULL,
 	[SPE_POSIX1_ADJTIMEX]		= default_posix1_handler_adjtimex,
 	[SPE_POSIX1_CLOSE]		= default_posix1_handler_close,
@@ -2306,7 +2306,7 @@ int (*default_posix1_funcs[SPE_POSIX1_NR
  *
  * Default POSIX.1 call dispatch function.
  */
-int default_posix1_handler(char *base, unsigned long offset)
+int _base_spe_default_posix1_handler(char *base, unsigned long offset)
 {
     int op, opdata;
 
Index: b/spebase/default_posix1_handler.h
===================================================================
--- a/spebase/default_posix1_handler.h	2007-06-29 20:55:10.000000000 +0900
+++ b/spebase/default_posix1_handler.h	2007-07-19 12:50:56.000000000 +0900
@@ -22,74 +22,6 @@
 
 #define SPE_POSIX1_CLASS     0x2101
 
-extern int default_posix1_handler(char *ls, unsigned long args);
-extern int default_posix1_handler_adjtimex(char *ls, unsigned long args);
-extern int default_posix1_handler_close(char *ls, unsigned long args);
-extern int default_posix1_handler_creat(char *ls, unsigned long args);
-extern int default_posix1_handler_fstat(char *ls, unsigned long args);
-extern int default_posix1_handler_ftok(char *ls, unsigned long args);
-extern int default_posix1_handler_getpagesize(char *ls, unsigned long args);
-extern int default_posix1_handler_gettimeofday(char *ls, unsigned long args);
-extern int default_posix1_handler_kill(char *ls, unsigned long args);
-extern int default_posix1_handler_lseek(char *ls, unsigned long args);
-extern int default_posix1_handler_lstat(char *ls, unsigned long args);
-extern int default_posix1_handler_mmap(char *ls, unsigned long args);
-extern int default_posix1_handler_mremap(char *ls, unsigned long args);
-extern int default_posix1_handler_msync(char *ls, unsigned long args);
-extern int default_posix1_handler_munmap(char *ls, unsigned long args);
-extern int default_posix1_handler_open(char *ls, unsigned long args);
-extern int default_posix1_handler_read(char *ls, unsigned long args);
-extern int default_posix1_handler_shmat(char *ls, unsigned long args);
-extern int default_posix1_handler_shmctl(char *ls, unsigned long args);
-extern int default_posix1_handler_shmdt(char *ls, unsigned long args);
-extern int default_posix1_handler_shmget(char *ls, unsigned long args);
-extern int default_posix1_handler_shm_open(char *ls, unsigned long args);
-extern int default_posix1_handler_shm_unlink(char *ls, unsigned long args);
-extern int default_posix1_handler_stat(char *ls, unsigned long args);
-extern int default_posix1_handler_unlink(char *ls, unsigned long args);
-extern int default_posix1_handler_wait(char *ls, unsigned long args);
-extern int default_posix1_handler_waitpid(char *ls, unsigned long args);
-extern int default_posix1_handler_write(char *ls, unsigned long args);
-extern int default_posix1_handler_ftruncate(char *ls, unsigned long args);
-extern int default_posix1_handler_access(char *ls, unsigned long args);
-extern int default_posix1_handler_dup(char *ls, unsigned long args);
-extern int default_posix1_handler_time(char *ls, unsigned long args);
-extern int default_posix1_handler_nanosleep(char *ls, unsigned long args);
-extern int default_posix1_handler_chdir(char *ls, unsigned long args);
-extern int default_posix1_handler_fchdir(char *ls, unsigned long args);
-extern int default_posix1_handler_mkdir(char *ls, unsigned long args);
-extern int default_posix1_handler_mknod(char *ls, unsigned long args);
-extern int default_posix1_handler_rmdir(char *ls, unsigned long args);
-extern int default_posix1_handler_chmod(char *ls, unsigned long args);
-extern int default_posix1_handler_fchmod(char *ls, unsigned long args);
-extern int default_posix1_handler_chown(char *ls, unsigned long args);
-extern int default_posix1_handler_fchown(char *ls, unsigned long args);
-extern int default_posix1_handler_lchown(char *ls, unsigned long args);
-extern int default_posix1_handler_getcwd(char *ls, unsigned long args);
-extern int default_posix1_handler_link(char *ls, unsigned long args);
-extern int default_posix1_handler_symlink(char *ls, unsigned long args);
-extern int default_posix1_handler_readlink(char *ls, unsigned long args);
-extern int default_posix1_handler_sync(char *ls, unsigned long args);
-extern int default_posix1_handler_fsync(char *ls, unsigned long args);
-extern int default_posix1_handler_fdatasync(char *ls, unsigned long args);
-extern int default_posix1_handler_dup2(char *ls, unsigned long args);
-extern int default_posix1_handler_lockf(char *ls, unsigned long args);
-extern int default_posix1_handler_truncate(char *ls, unsigned long args);
-extern int default_posix1_handler_mkstemp(char *ls, unsigned long args);
-extern int default_posix1_handler_mktemp(char *ls, unsigned long args);
-extern int default_posix1_handler_opendir(char *ls, unsigned long args);
-extern int default_posix1_handler_closedir(char *ls, unsigned long args);
-extern int default_posix1_handler_readdir(char *ls, unsigned long args);
-extern int default_posix1_handler_rewinddir(char *ls, unsigned long args);
-extern int default_posix1_handler_seekdir(char *ls, unsigned long args);
-extern int default_posix1_handler_telldir(char *ls, unsigned long args);
-extern int default_posix1_handler_sched_yield(char *ls, unsigned long args);
-extern int default_posix1_handler_umask(char *ls, unsigned long args);
-extern int default_posix1_handler_utime(char *ls, unsigned long args);
-extern int default_posix1_handler_utimes(char *ls, unsigned long args);
-extern int default_posix1_handler_pread(char *ls, unsigned long args);
-extern int default_posix1_handler_pwrite(char *ls, unsigned long args);
-extern int default_posix1_handler_readv(char *ls, unsigned long args);
-extern int default_posix1_handler_writev(char *ls, unsigned long args);
+extern int _base_spe_default_posix1_handler(char *ls, unsigned long args);
 
 #endif /* __DEFAULT_POSIX1_HANDLER_H__ */
Index: b/spebase/lib_builtin.c
===================================================================
--- a/spebase/lib_builtin.c	2007-07-19 12:49:21.000000000 +0900
+++ b/spebase/lib_builtin.c	2007-07-19 15:06:38.000000000 +0900
@@ -29,7 +29,7 @@
 /*Default SPE library call handlers for 21xx stop-and-signal.
 */
 static void *handlers[] = {
-        _base_spe_default_c99_handler, default_posix1_handler,
+        _base_spe_default_c99_handler, _base_spe_default_posix1_handler,
         NULL,NULL,default_libea_handler ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
         NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
         NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,



More information about the cbe-oss-dev mailing list