Make bitmask tables static const
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Oct 2008 10:51:10 +0000 (10:51 +0000)
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>
Sun, 5 Oct 2008 10:51:10 +0000 (10:51 +0000)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5425 c046a42c-6fe2-441c-8c8c-71466251a162

linux-user/syscall.c
thunk.c
thunk.h

index f7cfea64bdc761a54b76e01b13d1465cf5d4c338..ab7bfcb610569ddc3ebe160b2f118aea84961d16 100644 (file)
@@ -2230,7 +2230,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
     return ret;
 }
 
-bitmask_transtbl iflag_tbl[] = {
+static const bitmask_transtbl iflag_tbl[] = {
         { TARGET_IGNBRK, TARGET_IGNBRK, IGNBRK, IGNBRK },
         { TARGET_BRKINT, TARGET_BRKINT, BRKINT, BRKINT },
         { TARGET_IGNPAR, TARGET_IGNPAR, IGNPAR, IGNPAR },
@@ -2248,7 +2248,7 @@ bitmask_transtbl iflag_tbl[] = {
         { 0, 0, 0, 0 }
 };
 
-bitmask_transtbl oflag_tbl[] = {
+static const bitmask_transtbl oflag_tbl[] = {
        { TARGET_OPOST, TARGET_OPOST, OPOST, OPOST },
        { TARGET_OLCUC, TARGET_OLCUC, OLCUC, OLCUC },
        { TARGET_ONLCR, TARGET_ONLCR, ONLCR, ONLCR },
@@ -2276,7 +2276,7 @@ bitmask_transtbl oflag_tbl[] = {
        { 0, 0, 0, 0 }
 };
 
-bitmask_transtbl cflag_tbl[] = {
+static const bitmask_transtbl cflag_tbl[] = {
        { TARGET_CBAUD, TARGET_B0, CBAUD, B0 },
        { TARGET_CBAUD, TARGET_B50, CBAUD, B50 },
        { TARGET_CBAUD, TARGET_B75, CBAUD, B75 },
@@ -2311,7 +2311,7 @@ bitmask_transtbl cflag_tbl[] = {
        { 0, 0, 0, 0 }
 };
 
-bitmask_transtbl lflag_tbl[] = {
+static const bitmask_transtbl lflag_tbl[] = {
        { TARGET_ISIG, TARGET_ISIG, ISIG, ISIG },
        { TARGET_ICANON, TARGET_ICANON, ICANON, ICANON },
        { TARGET_XCASE, TARGET_XCASE, XCASE, XCASE },
diff --git a/thunk.c b/thunk.c
index 04f5f869c49316890a2706ff9c5a4ea86a2989d4..8f3e637b737313898544aa944e0c391f73ca8cc7 100644 (file)
--- a/thunk.c
+++ b/thunk.c
@@ -249,9 +249,9 @@ const argtype *thunk_convert(void *dst, const void *src,
  * between X86 and Alpha formats...
  */
 unsigned int target_to_host_bitmask(unsigned int x86_mask,
-                                    bitmask_transtbl * trans_tbl)
+                                    const bitmask_transtbl * trans_tbl)
 {
-    bitmask_transtbl * btp;
+    const bitmask_transtbl *btp;
     unsigned int       alpha_mask = 0;
 
     for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) {
@@ -263,9 +263,9 @@ unsigned int target_to_host_bitmask(unsigned int x86_mask,
 }
 
 unsigned int host_to_target_bitmask(unsigned int alpha_mask,
-                                    bitmask_transtbl * trans_tbl)
+                                    const bitmask_transtbl * trans_tbl)
 {
-    bitmask_transtbl * btp;
+    const bitmask_transtbl *btp;
     unsigned int       x86_mask = 0;
 
     for(btp = trans_tbl; btp->x86_mask && btp->alpha_mask; btp++) {
diff --git a/thunk.h b/thunk.h
index 017a3278bd9ce91132e114231770dbe5d7998666..effc5e24462fa76a432bf9e5eeadfa110ce77ace 100644 (file)
--- a/thunk.h
+++ b/thunk.h
@@ -155,8 +155,8 @@ static inline int thunk_type_align(const argtype *type_ptr, int is_host)
 #endif /* NO_THUNK_TYPE_SIZE */
 
 unsigned int target_to_host_bitmask(unsigned int x86_mask,
-                                    bitmask_transtbl * trans_tbl);
+                                    const bitmask_transtbl * trans_tbl);
 unsigned int host_to_target_bitmask(unsigned int alpha_mask,
-                                    bitmask_transtbl * trans_tbl);
+                                    const bitmask_transtbl * trans_tbl);
 
 #endif