a5bd9f6
From adebf599a9df7cf86a40a04429edcf24a572adac Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
a5bd9f6
Date: Fri, 1 Mar 2013 11:15:09 +0100
a5bd9f6
Subject: [PATCH 175/364] 	* grub-core/gentrigtables.c: Make tables
a5bd9f6
 const.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                 | 4 ++++
a5bd9f6
 grub-core/gentrigtables.c | 2 +-
a5bd9f6
 include/grub/trig.h       | 4 ++--
a5bd9f6
 3 files changed, 7 insertions(+), 3 deletions(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 7f5bcfa..fda449d 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,5 +1,9 @@
a5bd9f6
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
+	* grub-core/gentrigtables.c: Make tables const.
a5bd9f6
+
a5bd9f6
+2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
+
a5bd9f6
 	Remove nested functions from videoinfo iterators.
a5bd9f6
 
a5bd9f6
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
diff --git a/grub-core/gentrigtables.c b/grub-core/gentrigtables.c
a5bd9f6
index 8c03957..fface6e 100644
a5bd9f6
--- a/grub-core/gentrigtables.c
a5bd9f6
+++ b/grub-core/gentrigtables.c
a5bd9f6
@@ -40,7 +40,7 @@ main (int argc __attribute__ ((unused)),
a5bd9f6
   printf ("GRUB_MOD_DUAL_LICENSE (\"Public Domain\");");
a5bd9f6
 
a5bd9f6
 #define TAB(op) \
a5bd9f6
-  printf ("grub_int16_t grub_trig_" #op "tab[] =\n{"); \
a5bd9f6
+  printf ("const grub_int16_t grub_trig_" #op "tab[] =\n{"); \
a5bd9f6
   for (i = 0; i < GRUB_TRIG_ANGLE_MAX; i++) \
a5bd9f6
     { \
a5bd9f6
       double x = i * 2 * M_PI / GRUB_TRIG_ANGLE_MAX; \
a5bd9f6
diff --git a/include/grub/trig.h b/include/grub/trig.h
a5bd9f6
index 2512a5f..f19617c 100644
a5bd9f6
--- a/include/grub/trig.h
a5bd9f6
+++ b/include/grub/trig.h
a5bd9f6
@@ -24,8 +24,8 @@
a5bd9f6
 #define GRUB_TRIG_ANGLE_MASK 255
a5bd9f6
 #define GRUB_TRIG_FRACTION_SCALE 16384
a5bd9f6
 
a5bd9f6
-extern short grub_trig_sintab[];
a5bd9f6
-extern short grub_trig_costab[];
a5bd9f6
+extern const short grub_trig_sintab[];
a5bd9f6
+extern const short grub_trig_costab[];
a5bd9f6
 
a5bd9f6
 static __inline int
a5bd9f6
 grub_sin (int x)
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6