ulogd: moved to github
[openwrt.org/packages.git] / libs / 110-cross_compile.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
--- a/storage/innodb_plugin/plug.in
+++ b/storage/innodb_plugin/plug.in
@@ -56,10 +56,8 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
   esac
   AC_SUBST(INNODB_DYNAMIC_CFLAGS)
 
-  AC_MSG_CHECKING(whether GCC atomic builtins are available)
-  # either define HAVE_IB_GCC_ATOMIC_BUILTINS or not
-  AC_TRY_RUN(
-    [
+  AC_CACHE_CHECK([whether GCC atomic builtins are available],
+                [mysql_cv_gcc_atomic_builtins], [AC_TRY_RUN([
       int main()
       {
        long    x;
@@ -96,21 +94,18 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
 
        return(0);
       }
-    ],
-    [
-      AC_DEFINE([HAVE_IB_GCC_ATOMIC_BUILTINS], [1],
-                [GCC atomic builtins are available])
-      AC_MSG_RESULT(yes)
-    ],
-    [
-      AC_MSG_RESULT(no)
-    ]
-  )
+    ], [mysql_cv_gcc_atomic_builtins=yes],
+       [mysql_cv_gcc_atomic_builtins=no],
+       [mysql_cv_gcc_atomic_builtins=no])])
+
+  if test "x$mysql_cv_gcc_atomic_builtins" = xyes; then
+    AC_DEFINE(HAVE_IB_GCC_ATOMIC_BUILTINS, 1,
+              [Define to 1 if compiler provides atomic builtins.])
+  fi
 
-  AC_MSG_CHECKING(whether pthread_t can be used by GCC atomic builtins)
-  # either define HAVE_IB_ATOMIC_PTHREAD_T_GCC or not
-  AC_TRY_RUN(
-    [
+
+  AC_CACHE_CHECK([whether pthread_t can be used by GCC atomic builtins],
+                [mysql_cv_gcc_atomic_builtins_pthread_t], [AC_TRY_RUN([
       #include <pthread.h>
       #include <string.h>
 
@@ -127,16 +122,14 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
 
         return(0);
       }
-    ],
-    [
-      AC_DEFINE([HAVE_IB_ATOMIC_PTHREAD_T_GCC], [1],
-                [pthread_t can be used by GCC atomic builtins])
-      AC_MSG_RESULT(yes)
-    ],
-    [
-      AC_MSG_RESULT(no)
-    ]
-  )
+    ], [mysql_cv_gcc_atomic_builtins_pthread_t=yes],
+       [mysql_cv_gcc_atomic_builtins_pthread_t=no],
+       [mysql_cv_gcc_atomic_builtins_pthread_t=no])])
+
+  if test "x$mysql_cv_gcc_atomic_builtins_pthread_t" = xyes; then
+    AC_DEFINE(HAVE_IB_ATOMIC_PTHREAD_T_GCC, 1,
+              [Define to 1 if pthread_t can be used by GCC atomic builtins])
+  fi
 
   AC_MSG_CHECKING(whether Solaris libc atomic functions are available)
   # Define HAVE_IB_SOLARIS_ATOMICS if _all_ of the following
@@ -156,7 +149,6 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
     AC_DEFINE([HAVE_IB_SOLARIS_ATOMICS], [1],
       [Define to 1 if Solaris libc atomic functions are available]
     )
-  fi
 
   AC_MSG_CHECKING(whether pthread_t can be used by Solaris libc atomic functions)
   # either define HAVE_IB_ATOMIC_PTHREAD_T_SOLARIS or not
@@ -230,6 +222,8 @@ MYSQL_PLUGIN_ACTIONS(innodb_plugin,  [
       AC_MSG_RESULT(no)
     ]
   )
+  fi
+
   ])
 
 # vim: set ft=config:
--- a/sql/gen_lex_hash.cc
+++ b/sql/gen_lex_hash.cc
@@ -344,55 +344,6 @@ void print_find_structs()
 }
 
 
-static void usage(int version)
-{
-  printf("%s  Ver 3.6 Distrib %s, for %s (%s)\n",
-        my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE);
-  if (version)
-    return;
-  puts(ORACLE_WELCOME_COPYRIGHT_NOTICE("2000"));
-  puts("This program generates a perfect hashing function for the sql_lex.cc");
-  printf("Usage: %s [OPTIONS]\n\n", my_progname);
-  my_print_help(my_long_options);
-}
-
-
-extern "C" my_bool
-get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
-              char *argument __attribute__((unused)))
-{
-  switch(optid) {
-  case 'V':
-    usage(1);
-    exit(0);
-  case 'I':
-  case '?':
-    usage(0);
-    exit(0);
-  case '#':
-    DBUG_PUSH(argument ? argument : default_dbug_option);
-    break;
-  }
-  return 0;
-}
-
-
-static int get_options(int argc, char **argv)
-{
-  int ho_error;
-
-  if ((ho_error= handle_options(&argc, &argv, my_long_options, get_one_option)))
-    exit(ho_error);
-
-  if (argc >= 1)
-  {
-    usage(0);
-     exit(1);
-  }
-  return(0);
-}
-
-
 int check_dup_symbols(SYMBOL *s1, SYMBOL *s2)
 {
   if (s1->length!=s2->length || strncmp(s1->name,s2->name,s1->length))
@@ -443,12 +394,6 @@ int check_duplicates()
 
 int main(int argc,char **argv)
 {
-  MY_INIT(argv[0]);
-  DBUG_PROCESS(argv[0]);
-
-  if (get_options(argc,(char **) argv))
-    exit(1);
-
   /* Broken up to indicate that it's not advice to you, gentle reader. */
   printf("/*\n\n  Do " "not " "edit " "this " "file " "directly!\n\n*/\n");
 
@@ -549,7 +494,6 @@ static SYMBOL *get_hash_symbol(const cha
   }\n\
 }\n"
 );
-  my_end(0);
   exit(0);
 }
 
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -26,7 +26,6 @@ INCLUDES =            @ZLIB_INCLUDES@ \
 WRAPLIBS=              @WRAPLIBS@
 SUBDIRS =              share
 libexec_PROGRAMS =     mysqld
-EXTRA_PROGRAMS =       gen_lex_hash
 bin_PROGRAMS =         mysql_tzinfo_to_sql
 
 noinst_LTLIBRARIES=    libndb.la \
 
comments