]> granicus.if.org Git - strace/commitdiff
2005-06-08 Dmitry V. Levin <ldv@altlinux.org>
authorRoland McGrath <roland@redhat.com>
Wed, 8 Jun 2005 20:45:28 +0000 (20:45 +0000)
committerRoland McGrath <roland@redhat.com>
Wed, 8 Jun 2005 20:45:28 +0000 (20:45 +0000)
Minor namespace cleanup.
* defs.h (string_quote): Remove declaration.
* file.c (openmodessol) [LINUXSPARC]: Make static.
(fileflags): Likewise.
(aclcmds, aclipc) [HAVE_SYS_ACL_H]: Likewise.
(direnttypes) [FREEBSD || LINUX]: Likewise.
(xattrflags): Likewise.
* process.c (unalignctl_string): Make static.
(setarg): Disable.
* syscall.c (subcalls_table): Make static.
(socket_map) [!(LINUX && (ALPHA || MIPS))]: Likewise.
(sparc_socket_decode): Make static, define for [SPARC || SPARC64] only.
(decode_subcall): Make static.
(syscall_fixup): Likewise.
(get_error): Likewise.
(syscall_enter): Likewise.
* util.c (tv_tv): Disable.
(getpc): Likewise.
(string_quote): Make static.
Fixes RH#159688.

defs.h
file.c
process.c
syscall.c
util.c

diff --git a/defs.h b/defs.h
index 24cf19cd17f939d9807794e053f5aedaba572210..89eaddbea6a8971fb3e11eac3bf8b4ddd9a77512 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -435,7 +435,6 @@ extern int umovestr P((struct tcb *, long, int, char *));
 extern int upeek P((int, long, long *));
 extern void dumpiov P((struct tcb *, int, long));
 extern void dumpstr P((struct tcb *, long, int));
-extern void string_quote P((char *str));
 extern void printstr P((struct tcb *, long, int));
 extern void printnum P((struct tcb *, long, char *));
 extern void printpath P((struct tcb *, long));
diff --git a/file.c b/file.c
index db6b60aeb9c05aa539b0715290e7c360172915a0..dd825b0f44aaf53e4c9b94280c2dcfbf1e116738 100644 (file)
--- a/file.c
+++ b/file.c
@@ -325,7 +325,7 @@ struct tcb *tcp;
 }
 
 #ifdef LINUXSPARC
-const struct xlat openmodessol[] = {
+static const struct xlat openmodessol[] = {
        { 0,            "O_RDWR"        },
        { 1,            "O_RDONLY"      },
        { 2,            "O_WRONLY"      },
@@ -753,7 +753,7 @@ long addr;
 #endif /* SPARC64 */
 #endif /* LINUXSPARC */
 
-const struct xlat fileflags[] = {
+static const struct xlat fileflags[] = {
 #ifdef FREEBSD
        { UF_NODUMP,    "UF_NODUMP"     },
        { UF_IMMUTABLE, "UF_IMMUTABLE"  },
@@ -1296,7 +1296,7 @@ struct tcb *tcp;
 
 #include <sys/acl.h>
 
-const struct xlat aclcmds[] = {
+static const struct xlat aclcmds[] = {
 #ifdef SETACL
        { SETACL,       "SETACL"        },
 #endif
@@ -1361,7 +1361,7 @@ struct tcb *tcp;
 }
 
 
-const struct xlat aclipc[] = {
+static const struct xlat aclipc[] = {
 #ifdef IPC_SHM
        { IPC_SHM,      "IPC_SHM"       },
 #endif
@@ -1987,7 +1987,7 @@ struct tcb *tcp;
 #endif /* LINUX */
 
 #if defined FREEBSD || defined LINUX
-const struct xlat direnttypes[] = {
+static const struct xlat direnttypes[] = {
        { DT_UNKNOWN,   "DT_UNKNOWN"    },
        { DT_FIFO,      "DT_FIFO"       },
        { DT_CHR,       "DT_CHR"        },
@@ -2323,7 +2323,7 @@ struct tcb *tcp;
 
 #endif /* HAVE_SYS_ASYNCH_H */
 
-const struct xlat xattrflags[] = {
+static const struct xlat xattrflags[] = {
 #ifdef XATTR_CREATE
        { XATTR_CREATE,  "XATTR_CREATE" },
        { XATTR_REPLACE, "XATTR_REPLACE" },
index 2d8cb0ae42e462a9686840db78a272568f52d447..f9cffe42e41236d47e6897bc0220599e9cd82dd6 100644 (file)
--- a/process.c
+++ b/process.c
@@ -220,7 +220,7 @@ static const struct xlat prctl_options[] = {
 };
 
 
-const char *
+static const char *
 unalignctl_string (unsigned int ctl)
 {
        static char buf[16];
@@ -701,6 +701,7 @@ int new;
        return -1;
 }
 
+#if 0
 int
 setarg(tcp, argnum)
        struct tcb *tcp;
@@ -778,6 +779,7 @@ setarg(tcp, argnum)
 #endif
        return 0;
 }
+#endif
 
 #if defined SYS_clone || defined SYS_clone2
 int
index 34fc07213f29884ec2a6fea041483c683ddce94a..675b3f4f4a679ae8db3a1edd95aff9eb56cb814f 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -513,7 +513,7 @@ struct subcall {
   int subcalls[5];
 };
 
-const struct subcall subcalls_table[] = {
+static const struct subcall subcalls_table[] = {
   { SYS_shmsys, 5, { SYS_shmat, SYS_shmctl, SYS_shmdt, SYS_shmget, SYS_shmctl } },
 #ifdef SYS_semconfig
   { SYS_semsys, 4, { SYS___semctl, SYS_semget, SYS_semop, SYS_semconfig } },
@@ -526,7 +526,7 @@ const struct subcall subcalls_table[] = {
 
 #if !(defined(LINUX) && ( defined(ALPHA) || defined(MIPS) ))
 
-const int socket_map [] = {
+static const int socket_map [] = {
               /* SYS_SOCKET      */ 97,
               /* SYS_BIND        */ 104,
               /* SYS_CONNECT     */ 98,
@@ -546,7 +546,8 @@ const int socket_map [] = {
               /* SYS_RECVMSG     */ 113
 };
 
-void
+#if defined (SPARC) || defined (SPARC64)
+static void
 sparc_socket_decode (tcp)
 struct tcb *tcp;
 {
@@ -567,8 +568,9 @@ struct tcb *tcp;
                addr += sizeof (arg);
        }
 }
+#endif
 
-void
+static void
 decode_subcall(tcp, subcall, nsubcalls, style)
 struct tcb *tcp;
 int subcall;
@@ -1277,7 +1279,7 @@ struct tcb *tcp;
        return scno;
 }
 
-int
+static int
 syscall_fixup(tcp)
 struct tcb *tcp;
 {
@@ -1421,7 +1423,7 @@ struct tcb *tcp;
        return 1;
 }
 
-int
+static int
 get_error(tcp)
 struct tcb *tcp;
 {
@@ -1855,7 +1857,8 @@ force_result(tcp, error, rval)
        return 0;
 }
 
-int syscall_enter(tcp)
+static int
+syscall_enter(tcp)
 struct tcb *tcp;
 {
 #ifndef USE_PROCFS
diff --git a/util.c b/util.c
index a5ade4178c7d04f9286a5de2c57687ce90d1dc36..d65f42ced7ea9003f9c1cf6d5a6dc228f9b6ac07 100644 (file)
--- a/util.c
+++ b/util.c
@@ -148,6 +148,7 @@ static _hack_syscall5(int,_ptrace,int,__request,int,__pid,int,__addr,int,__data,
 #define MIN(a,b)               (((a) < (b)) ? (a) : (b))
 #endif
 
+#if 0
 void
 tv_tv(tv, a, b)
 struct timeval *tv;
@@ -157,6 +158,7 @@ int b;
        tv->tv_sec = a;
        tv->tv_usec = b;
 }
+#endif
 
 int
 tv_nz(a)
@@ -358,9 +360,9 @@ unsigned long uid;
 
 static char path[MAXPATHLEN + 1];
 
-void
+static void
 string_quote(str)
-char *str;
+const char *str;
 {
        char buf[2 * MAXPATHLEN + 1];
        char *s;
@@ -976,6 +978,7 @@ long *res;
 
 #endif /* !USE_PROCFS */
 
+#if 0
 long
 getpc(tcp)
 struct tcb *tcp;
@@ -1053,6 +1056,7 @@ struct tcb *tcp;
        return regs.r_eip;
 #endif /* FREEBSD */
 }
+#endif
 
 void
 printcall(tcp)