nutcracker 0.3.0.12 → 0.4.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. checksums.yaml +5 -13
  2. data/README.md +3 -3
  3. data/Rakefile +12 -10
  4. data/ext/nutcracker/Makefile.in +215 -162
  5. data/ext/nutcracker/README.md +16 -4
  6. data/ext/nutcracker/aclocal.m4 +432 -254
  7. data/ext/nutcracker/{contrib/yaml-0.1.4/configure → autom4te.cache/output.0} +11367 -4545
  8. data/ext/nutcracker/autom4te.cache/output.1 +19907 -0
  9. data/ext/nutcracker/autom4te.cache/output.2 +19907 -0
  10. data/ext/nutcracker/autom4te.cache/requests +518 -0
  11. data/ext/nutcracker/autom4te.cache/traces.0 +2715 -0
  12. data/ext/nutcracker/autom4te.cache/traces.1 +967 -0
  13. data/ext/nutcracker/autom4te.cache/traces.2 +2715 -0
  14. data/ext/nutcracker/config/compile +347 -0
  15. data/ext/nutcracker/config/config.guess +116 -78
  16. data/ext/nutcracker/config/config.sub +65 -45
  17. data/ext/nutcracker/config/depcomp +295 -192
  18. data/ext/nutcracker/config/install-sh +7 -7
  19. data/ext/nutcracker/config/ltmain.sh +15 -20
  20. data/ext/nutcracker/config/missing +149 -265
  21. data/ext/nutcracker/configure +493 -367
  22. data/ext/nutcracker/contrib/Makefile.in +158 -116
  23. data/ext/nutcracker/extconf.rb +0 -1
  24. data/ext/nutcracker/m4/libtool.m4 +4 -23
  25. data/ext/nutcracker/m4/ltoptions.m4 +0 -0
  26. data/ext/nutcracker/m4/ltsugar.m4 +0 -0
  27. data/ext/nutcracker/m4/ltversion.m4 +0 -0
  28. data/ext/nutcracker/m4/lt~obsolete.m4 +0 -0
  29. data/ext/nutcracker/notes/recommendation.md +1 -1
  30. data/ext/nutcracker/notes/redis.md +35 -3
  31. data/ext/nutcracker/scripts/benchmark-mget.py +43 -0
  32. data/ext/nutcracker/scripts/nutcracker.spec +61 -3
  33. data/ext/nutcracker/scripts/redis-check.sh +43 -0
  34. data/ext/nutcracker/src/Makefile.in +205 -142
  35. data/ext/nutcracker/src/event/Makefile.in +164 -66
  36. data/ext/nutcracker/src/hashkit/Makefile.in +164 -66
  37. data/ext/nutcracker/src/nc_conf.c +2 -0
  38. data/ext/nutcracker/src/nc_connection.c +31 -0
  39. data/ext/nutcracker/src/nc_connection.h +3 -0
  40. data/ext/nutcracker/src/nc_core.c +38 -2
  41. data/ext/nutcracker/src/nc_core.h +11 -0
  42. data/ext/nutcracker/src/nc_log.c +90 -12
  43. data/ext/nutcracker/src/nc_log.h +11 -0
  44. data/ext/nutcracker/src/nc_mbuf.h +1 -1
  45. data/ext/nutcracker/src/nc_message.c +162 -116
  46. data/ext/nutcracker/src/nc_message.h +161 -129
  47. data/ext/nutcracker/src/nc_proxy.c +34 -4
  48. data/ext/nutcracker/src/nc_request.c +158 -32
  49. data/ext/nutcracker/src/nc_server.c +59 -5
  50. data/ext/nutcracker/src/nc_server.h +1 -0
  51. data/ext/nutcracker/src/nc_signal.c +2 -2
  52. data/ext/nutcracker/src/nc_stats.c +21 -0
  53. data/ext/nutcracker/src/nc_stats.h +28 -26
  54. data/ext/nutcracker/src/nc_string.c +176 -1
  55. data/ext/nutcracker/src/nc_string.h +26 -0
  56. data/ext/nutcracker/src/nc_util.c +12 -0
  57. data/ext/nutcracker/src/nc_util.h +1 -0
  58. data/ext/nutcracker/src/proto/Makefile.in +164 -66
  59. data/ext/nutcracker/src/proto/nc_memcache.c +279 -88
  60. data/ext/nutcracker/src/proto/nc_proto.h +3 -4
  61. data/ext/nutcracker/src/proto/nc_redis.c +561 -134
  62. data/lib/nutcracker/version.rb +1 -1
  63. metadata +31 -67
  64. data/ext/nutcracker/contrib/yaml-0.1.4/LICENSE +0 -19
  65. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile.am +0 -20
  66. data/ext/nutcracker/contrib/yaml-0.1.4/Makefile.in +0 -736
  67. data/ext/nutcracker/contrib/yaml-0.1.4/README +0 -27
  68. data/ext/nutcracker/contrib/yaml-0.1.4/aclocal.m4 +0 -956
  69. data/ext/nutcracker/contrib/yaml-0.1.4/config.h.in +0 -80
  70. data/ext/nutcracker/contrib/yaml-0.1.4/config/config.guess +0 -1561
  71. data/ext/nutcracker/contrib/yaml-0.1.4/config/config.sub +0 -1686
  72. data/ext/nutcracker/contrib/yaml-0.1.4/config/depcomp +0 -630
  73. data/ext/nutcracker/contrib/yaml-0.1.4/config/install-sh +0 -520
  74. data/ext/nutcracker/contrib/yaml-0.1.4/config/ltmain.sh +0 -8406
  75. data/ext/nutcracker/contrib/yaml-0.1.4/config/missing +0 -376
  76. data/ext/nutcracker/contrib/yaml-0.1.4/configure.ac +0 -75
  77. data/ext/nutcracker/contrib/yaml-0.1.4/doc/doxygen.cfg +0 -222
  78. data/ext/nutcracker/contrib/yaml-0.1.4/include/yaml.h +0 -1971
  79. data/ext/nutcracker/contrib/yaml-0.1.4/m4/libtool.m4 +0 -7357
  80. data/ext/nutcracker/contrib/yaml-0.1.4/m4/ltoptions.m4 +0 -368
  81. data/ext/nutcracker/contrib/yaml-0.1.4/m4/ltsugar.m4 +0 -123
  82. data/ext/nutcracker/contrib/yaml-0.1.4/m4/ltversion.m4 +0 -23
  83. data/ext/nutcracker/contrib/yaml-0.1.4/m4/lt~obsolete.m4 +0 -92
  84. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile.am +0 -4
  85. data/ext/nutcracker/contrib/yaml-0.1.4/src/Makefile.in +0 -484
  86. data/ext/nutcracker/contrib/yaml-0.1.4/src/api.c +0 -1392
  87. data/ext/nutcracker/contrib/yaml-0.1.4/src/dumper.c +0 -394
  88. data/ext/nutcracker/contrib/yaml-0.1.4/src/emitter.c +0 -2329
  89. data/ext/nutcracker/contrib/yaml-0.1.4/src/loader.c +0 -432
  90. data/ext/nutcracker/contrib/yaml-0.1.4/src/parser.c +0 -1374
  91. data/ext/nutcracker/contrib/yaml-0.1.4/src/reader.c +0 -465
  92. data/ext/nutcracker/contrib/yaml-0.1.4/src/scanner.c +0 -3570
  93. data/ext/nutcracker/contrib/yaml-0.1.4/src/writer.c +0 -141
  94. data/ext/nutcracker/contrib/yaml-0.1.4/src/yaml_private.h +0 -640
  95. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile.am +0 -8
  96. data/ext/nutcracker/contrib/yaml-0.1.4/tests/Makefile.in +0 -675
  97. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor-alt.c +0 -800
  98. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-deconstructor.c +0 -1130
  99. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter-alt.c +0 -217
  100. data/ext/nutcracker/contrib/yaml-0.1.4/tests/example-reformatter.c +0 -202
  101. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-dumper.c +0 -311
  102. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-emitter.c +0 -327
  103. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-loader.c +0 -63
  104. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-parser.c +0 -63
  105. data/ext/nutcracker/contrib/yaml-0.1.4/tests/run-scanner.c +0 -63
  106. data/ext/nutcracker/contrib/yaml-0.1.4/tests/test-reader.c +0 -354
  107. data/ext/nutcracker/contrib/yaml-0.1.4/tests/test-version.c +0 -29
@@ -0,0 +1,347 @@
1
+ #! /bin/sh
2
+ # Wrapper for compilers which do not understand '-c -o'.
3
+
4
+ scriptversion=2012-10-14.11; # UTC
5
+
6
+ # Copyright (C) 1999-2013 Free Software Foundation, Inc.
7
+ # Written by Tom Tromey <tromey@cygnus.com>.
8
+ #
9
+ # This program is free software; you can redistribute it and/or modify
10
+ # it under the terms of the GNU General Public License as published by
11
+ # the Free Software Foundation; either version 2, or (at your option)
12
+ # any later version.
13
+ #
14
+ # This program is distributed in the hope that it will be useful,
15
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ # GNU General Public License for more details.
18
+ #
19
+ # You should have received a copy of the GNU General Public License
20
+ # along with this program. If not, see <http://www.gnu.org/licenses/>.
21
+
22
+ # As a special exception to the GNU General Public License, if you
23
+ # distribute this file as part of a program that contains a
24
+ # configuration script generated by Autoconf, you may include it under
25
+ # the same distribution terms that you use for the rest of that program.
26
+
27
+ # This file is maintained in Automake, please report
28
+ # bugs to <bug-automake@gnu.org> or send patches to
29
+ # <automake-patches@gnu.org>.
30
+
31
+ nl='
32
+ '
33
+
34
+ # We need space, tab and new line, in precisely that order. Quoting is
35
+ # there to prevent tools from complaining about whitespace usage.
36
+ IFS=" "" $nl"
37
+
38
+ file_conv=
39
+
40
+ # func_file_conv build_file lazy
41
+ # Convert a $build file to $host form and store it in $file
42
+ # Currently only supports Windows hosts. If the determined conversion
43
+ # type is listed in (the comma separated) LAZY, no conversion will
44
+ # take place.
45
+ func_file_conv ()
46
+ {
47
+ file=$1
48
+ case $file in
49
+ / | /[!/]*) # absolute file, and not a UNC file
50
+ if test -z "$file_conv"; then
51
+ # lazily determine how to convert abs files
52
+ case `uname -s` in
53
+ MINGW*)
54
+ file_conv=mingw
55
+ ;;
56
+ CYGWIN*)
57
+ file_conv=cygwin
58
+ ;;
59
+ *)
60
+ file_conv=wine
61
+ ;;
62
+ esac
63
+ fi
64
+ case $file_conv/,$2, in
65
+ *,$file_conv,*)
66
+ ;;
67
+ mingw/*)
68
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
69
+ ;;
70
+ cygwin/*)
71
+ file=`cygpath -m "$file" || echo "$file"`
72
+ ;;
73
+ wine/*)
74
+ file=`winepath -w "$file" || echo "$file"`
75
+ ;;
76
+ esac
77
+ ;;
78
+ esac
79
+ }
80
+
81
+ # func_cl_dashL linkdir
82
+ # Make cl look for libraries in LINKDIR
83
+ func_cl_dashL ()
84
+ {
85
+ func_file_conv "$1"
86
+ if test -z "$lib_path"; then
87
+ lib_path=$file
88
+ else
89
+ lib_path="$lib_path;$file"
90
+ fi
91
+ linker_opts="$linker_opts -LIBPATH:$file"
92
+ }
93
+
94
+ # func_cl_dashl library
95
+ # Do a library search-path lookup for cl
96
+ func_cl_dashl ()
97
+ {
98
+ lib=$1
99
+ found=no
100
+ save_IFS=$IFS
101
+ IFS=';'
102
+ for dir in $lib_path $LIB
103
+ do
104
+ IFS=$save_IFS
105
+ if $shared && test -f "$dir/$lib.dll.lib"; then
106
+ found=yes
107
+ lib=$dir/$lib.dll.lib
108
+ break
109
+ fi
110
+ if test -f "$dir/$lib.lib"; then
111
+ found=yes
112
+ lib=$dir/$lib.lib
113
+ break
114
+ fi
115
+ if test -f "$dir/lib$lib.a"; then
116
+ found=yes
117
+ lib=$dir/lib$lib.a
118
+ break
119
+ fi
120
+ done
121
+ IFS=$save_IFS
122
+
123
+ if test "$found" != yes; then
124
+ lib=$lib.lib
125
+ fi
126
+ }
127
+
128
+ # func_cl_wrapper cl arg...
129
+ # Adjust compile command to suit cl
130
+ func_cl_wrapper ()
131
+ {
132
+ # Assume a capable shell
133
+ lib_path=
134
+ shared=:
135
+ linker_opts=
136
+ for arg
137
+ do
138
+ if test -n "$eat"; then
139
+ eat=
140
+ else
141
+ case $1 in
142
+ -o)
143
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
144
+ eat=1
145
+ case $2 in
146
+ *.o | *.[oO][bB][jJ])
147
+ func_file_conv "$2"
148
+ set x "$@" -Fo"$file"
149
+ shift
150
+ ;;
151
+ *)
152
+ func_file_conv "$2"
153
+ set x "$@" -Fe"$file"
154
+ shift
155
+ ;;
156
+ esac
157
+ ;;
158
+ -I)
159
+ eat=1
160
+ func_file_conv "$2" mingw
161
+ set x "$@" -I"$file"
162
+ shift
163
+ ;;
164
+ -I*)
165
+ func_file_conv "${1#-I}" mingw
166
+ set x "$@" -I"$file"
167
+ shift
168
+ ;;
169
+ -l)
170
+ eat=1
171
+ func_cl_dashl "$2"
172
+ set x "$@" "$lib"
173
+ shift
174
+ ;;
175
+ -l*)
176
+ func_cl_dashl "${1#-l}"
177
+ set x "$@" "$lib"
178
+ shift
179
+ ;;
180
+ -L)
181
+ eat=1
182
+ func_cl_dashL "$2"
183
+ ;;
184
+ -L*)
185
+ func_cl_dashL "${1#-L}"
186
+ ;;
187
+ -static)
188
+ shared=false
189
+ ;;
190
+ -Wl,*)
191
+ arg=${1#-Wl,}
192
+ save_ifs="$IFS"; IFS=','
193
+ for flag in $arg; do
194
+ IFS="$save_ifs"
195
+ linker_opts="$linker_opts $flag"
196
+ done
197
+ IFS="$save_ifs"
198
+ ;;
199
+ -Xlinker)
200
+ eat=1
201
+ linker_opts="$linker_opts $2"
202
+ ;;
203
+ -*)
204
+ set x "$@" "$1"
205
+ shift
206
+ ;;
207
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
208
+ func_file_conv "$1"
209
+ set x "$@" -Tp"$file"
210
+ shift
211
+ ;;
212
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
213
+ func_file_conv "$1" mingw
214
+ set x "$@" "$file"
215
+ shift
216
+ ;;
217
+ *)
218
+ set x "$@" "$1"
219
+ shift
220
+ ;;
221
+ esac
222
+ fi
223
+ shift
224
+ done
225
+ if test -n "$linker_opts"; then
226
+ linker_opts="-link$linker_opts"
227
+ fi
228
+ exec "$@" $linker_opts
229
+ exit 1
230
+ }
231
+
232
+ eat=
233
+
234
+ case $1 in
235
+ '')
236
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
237
+ exit 1;
238
+ ;;
239
+ -h | --h*)
240
+ cat <<\EOF
241
+ Usage: compile [--help] [--version] PROGRAM [ARGS]
242
+
243
+ Wrapper for compilers which do not understand '-c -o'.
244
+ Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
245
+ arguments, and rename the output as expected.
246
+
247
+ If you are trying to build a whole package this is not the
248
+ right script to run: please start by reading the file 'INSTALL'.
249
+
250
+ Report bugs to <bug-automake@gnu.org>.
251
+ EOF
252
+ exit $?
253
+ ;;
254
+ -v | --v*)
255
+ echo "compile $scriptversion"
256
+ exit $?
257
+ ;;
258
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
259
+ func_cl_wrapper "$@" # Doesn't return...
260
+ ;;
261
+ esac
262
+
263
+ ofile=
264
+ cfile=
265
+
266
+ for arg
267
+ do
268
+ if test -n "$eat"; then
269
+ eat=
270
+ else
271
+ case $1 in
272
+ -o)
273
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
274
+ # So we strip '-o arg' only if arg is an object.
275
+ eat=1
276
+ case $2 in
277
+ *.o | *.obj)
278
+ ofile=$2
279
+ ;;
280
+ *)
281
+ set x "$@" -o "$2"
282
+ shift
283
+ ;;
284
+ esac
285
+ ;;
286
+ *.c)
287
+ cfile=$1
288
+ set x "$@" "$1"
289
+ shift
290
+ ;;
291
+ *)
292
+ set x "$@" "$1"
293
+ shift
294
+ ;;
295
+ esac
296
+ fi
297
+ shift
298
+ done
299
+
300
+ if test -z "$ofile" || test -z "$cfile"; then
301
+ # If no '-o' option was seen then we might have been invoked from a
302
+ # pattern rule where we don't need one. That is ok -- this is a
303
+ # normal compilation that the losing compiler can handle. If no
304
+ # '.c' file was seen then we are probably linking. That is also
305
+ # ok.
306
+ exec "$@"
307
+ fi
308
+
309
+ # Name of file we expect compiler to create.
310
+ cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
311
+
312
+ # Create the lock directory.
313
+ # Note: use '[/\\:.-]' here to ensure that we don't use the same name
314
+ # that we are using for the .o file. Also, base the name on the expected
315
+ # object file name, since that is what matters with a parallel build.
316
+ lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
317
+ while true; do
318
+ if mkdir "$lockdir" >/dev/null 2>&1; then
319
+ break
320
+ fi
321
+ sleep 1
322
+ done
323
+ # FIXME: race condition here if user kills between mkdir and trap.
324
+ trap "rmdir '$lockdir'; exit 1" 1 2 15
325
+
326
+ # Run the compile.
327
+ "$@"
328
+ ret=$?
329
+
330
+ if test -f "$cofile"; then
331
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
332
+ elif test -f "${cofile}bj"; then
333
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
334
+ fi
335
+
336
+ rmdir "$lockdir"
337
+ exit $ret
338
+
339
+ # Local Variables:
340
+ # mode: shell-script
341
+ # sh-indentation: 2
342
+ # eval: (add-hook 'write-file-hooks 'time-stamp)
343
+ # time-stamp-start: "scriptversion="
344
+ # time-stamp-format: "%:y-%02m-%02d.%02H"
345
+ # time-stamp-time-zone: "UTC"
346
+ # time-stamp-end: "; # UTC"
347
+ # End:
@@ -1,14 +1,12 @@
1
1
  #! /bin/sh
2
2
  # Attempt to guess a canonical system name.
3
- # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
- # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5
- # 2011, 2012 Free Software Foundation, Inc.
3
+ # Copyright 1992-2013 Free Software Foundation, Inc.
6
4
 
7
- timestamp='2012-02-10'
5
+ timestamp='2013-11-29'
8
6
 
9
7
  # This file is free software; you can redistribute it and/or modify it
10
8
  # under the terms of the GNU General Public License as published by
11
- # the Free Software Foundation; either version 2 of the License, or
9
+ # the Free Software Foundation; either version 3 of the License, or
12
10
  # (at your option) any later version.
13
11
  #
14
12
  # This program is distributed in the hope that it will be useful, but
@@ -22,19 +20,17 @@ timestamp='2012-02-10'
22
20
  # As a special exception to the GNU General Public License, if you
23
21
  # distribute this file as part of a program that contains a
24
22
  # configuration script generated by Autoconf, you may include it under
25
- # the same distribution terms that you use for the rest of that program.
26
-
27
-
28
- # Originally written by Per Bothner. Please send patches (context
29
- # diff format) to <config-patches@gnu.org> and include a ChangeLog
30
- # entry.
23
+ # the same distribution terms that you use for the rest of that
24
+ # program. This Exception is an additional permission under section 7
25
+ # of the GNU General Public License, version 3 ("GPLv3").
31
26
  #
32
- # This script attempts to guess a canonical system name similar to
33
- # config.sub. If it succeeds, it prints the system name on stdout, and
34
- # exits with 0. Otherwise, it exits with 1.
27
+ # Originally written by Per Bothner.
35
28
  #
36
29
  # You can get the latest version of this script from:
37
30
  # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
31
+ #
32
+ # Please send patches with a ChangeLog entry to config-patches@gnu.org.
33
+
38
34
 
39
35
  me=`echo "$0" | sed -e 's,.*/,,'`
40
36
 
@@ -54,9 +50,7 @@ version="\
54
50
  GNU config.guess ($timestamp)
55
51
 
56
52
  Originally written by Per Bothner.
57
- Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
58
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
59
- Free Software Foundation, Inc.
53
+ Copyright 1992-2013 Free Software Foundation, Inc.
60
54
 
61
55
  This is free software; see the source for copying conditions. There is NO
62
56
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
@@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
138
132
  UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
139
133
  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
134
 
135
+ case "${UNAME_SYSTEM}" in
136
+ Linux|GNU|GNU/*)
137
+ # If the system lacks a compiler, then just pick glibc.
138
+ # We could probably try harder.
139
+ LIBC=gnu
140
+
141
+ eval $set_cc_for_build
142
+ cat <<-EOF > $dummy.c
143
+ #include <features.h>
144
+ #if defined(__UCLIBC__)
145
+ LIBC=uclibc
146
+ #elif defined(__dietlibc__)
147
+ LIBC=dietlibc
148
+ #else
149
+ LIBC=gnu
150
+ #endif
151
+ EOF
152
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
153
+ ;;
154
+ esac
155
+
141
156
  # Note: order is significant - the case branches are not exclusive.
142
157
 
143
158
  case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
200
215
  # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
201
216
  echo "${machine}-${os}${release}"
202
217
  exit ;;
218
+ *:Bitrig:*:*)
219
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
220
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
221
+ exit ;;
203
222
  *:OpenBSD:*:*)
204
223
  UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
205
224
  echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
302
321
  arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
303
322
  echo arm-acorn-riscix${UNAME_RELEASE}
304
323
  exit ;;
305
- arm:riscos:*:*|arm:RISCOS:*:*)
324
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
306
325
  echo arm-unknown-riscos
307
326
  exit ;;
308
327
  SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -801,6 +820,9 @@ EOF
801
820
  i*:CYGWIN*:*)
802
821
  echo ${UNAME_MACHINE}-pc-cygwin
803
822
  exit ;;
823
+ *:MINGW64*:*)
824
+ echo ${UNAME_MACHINE}-pc-mingw64
825
+ exit ;;
804
826
  *:MINGW*:*)
805
827
  echo ${UNAME_MACHINE}-pc-mingw32
806
828
  exit ;;
@@ -852,21 +874,21 @@ EOF
852
874
  exit ;;
853
875
  *:GNU:*:*)
854
876
  # the GNU system
855
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
877
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
856
878
  exit ;;
857
879
  *:GNU/*:*:*)
858
880
  # other systems with GNU libc and userland
859
- echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
881
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
860
882
  exit ;;
861
883
  i*86:Minix:*:*)
862
884
  echo ${UNAME_MACHINE}-pc-minix
863
885
  exit ;;
864
886
  aarch64:Linux:*:*)
865
- echo ${UNAME_MACHINE}-unknown-linux-gnu
887
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
866
888
  exit ;;
867
889
  aarch64_be:Linux:*:*)
868
890
  UNAME_MACHINE=aarch64_be
869
- echo ${UNAME_MACHINE}-unknown-linux-gnu
891
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
870
892
  exit ;;
871
893
  alpha:Linux:*:*)
872
894
  case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
@@ -879,59 +901,54 @@ EOF
879
901
  EV68*) UNAME_MACHINE=alphaev68 ;;
880
902
  esac
881
903
  objdump --private-headers /bin/sh | grep -q ld.so.1
882
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
883
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
904
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
905
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
906
+ exit ;;
907
+ arc:Linux:*:* | arceb:Linux:*:*)
908
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
884
909
  exit ;;
885
910
  arm*:Linux:*:*)
886
911
  eval $set_cc_for_build
887
912
  if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
888
913
  | grep -q __ARM_EABI__
889
914
  then
890
- echo ${UNAME_MACHINE}-unknown-linux-gnu
915
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
891
916
  else
892
917
  if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
893
918
  | grep -q __ARM_PCS_VFP
894
919
  then
895
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
920
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
896
921
  else
897
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
922
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
898
923
  fi
899
924
  fi
900
925
  exit ;;
901
926
  avr32*:Linux:*:*)
902
- echo ${UNAME_MACHINE}-unknown-linux-gnu
927
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
903
928
  exit ;;
904
929
  cris:Linux:*:*)
905
- echo ${UNAME_MACHINE}-axis-linux-gnu
930
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
906
931
  exit ;;
907
932
  crisv32:Linux:*:*)
908
- echo ${UNAME_MACHINE}-axis-linux-gnu
933
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
909
934
  exit ;;
910
935
  frv:Linux:*:*)
911
- echo ${UNAME_MACHINE}-unknown-linux-gnu
936
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
912
937
  exit ;;
913
938
  hexagon:Linux:*:*)
914
- echo ${UNAME_MACHINE}-unknown-linux-gnu
939
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915
940
  exit ;;
916
941
  i*86:Linux:*:*)
917
- LIBC=gnu
918
- eval $set_cc_for_build
919
- sed 's/^ //' << EOF >$dummy.c
920
- #ifdef __dietlibc__
921
- LIBC=dietlibc
922
- #endif
923
- EOF
924
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
925
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
942
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
926
943
  exit ;;
927
944
  ia64:Linux:*:*)
928
- echo ${UNAME_MACHINE}-unknown-linux-gnu
945
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
929
946
  exit ;;
930
947
  m32r*:Linux:*:*)
931
- echo ${UNAME_MACHINE}-unknown-linux-gnu
948
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
932
949
  exit ;;
933
950
  m68*:Linux:*:*)
934
- echo ${UNAME_MACHINE}-unknown-linux-gnu
951
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
935
952
  exit ;;
936
953
  mips:Linux:*:* | mips64:Linux:*:*)
937
954
  eval $set_cc_for_build
@@ -950,54 +967,63 @@ EOF
950
967
  #endif
951
968
  EOF
952
969
  eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
953
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
970
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
954
971
  ;;
972
+ or1k:Linux:*:*)
973
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
974
+ exit ;;
955
975
  or32:Linux:*:*)
956
- echo ${UNAME_MACHINE}-unknown-linux-gnu
976
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
957
977
  exit ;;
958
978
  padre:Linux:*:*)
959
- echo sparc-unknown-linux-gnu
979
+ echo sparc-unknown-linux-${LIBC}
960
980
  exit ;;
961
981
  parisc64:Linux:*:* | hppa64:Linux:*:*)
962
- echo hppa64-unknown-linux-gnu
982
+ echo hppa64-unknown-linux-${LIBC}
963
983
  exit ;;
964
984
  parisc:Linux:*:* | hppa:Linux:*:*)
965
985
  # Look for CPU level
966
986
  case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
967
- PA7*) echo hppa1.1-unknown-linux-gnu ;;
968
- PA8*) echo hppa2.0-unknown-linux-gnu ;;
969
- *) echo hppa-unknown-linux-gnu ;;
987
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
988
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
989
+ *) echo hppa-unknown-linux-${LIBC} ;;
970
990
  esac
971
991
  exit ;;
972
992
  ppc64:Linux:*:*)
973
- echo powerpc64-unknown-linux-gnu
993
+ echo powerpc64-unknown-linux-${LIBC}
974
994
  exit ;;
975
995
  ppc:Linux:*:*)
976
- echo powerpc-unknown-linux-gnu
996
+ echo powerpc-unknown-linux-${LIBC}
997
+ exit ;;
998
+ ppc64le:Linux:*:*)
999
+ echo powerpc64le-unknown-linux-${LIBC}
1000
+ exit ;;
1001
+ ppcle:Linux:*:*)
1002
+ echo powerpcle-unknown-linux-${LIBC}
977
1003
  exit ;;
978
1004
  s390:Linux:*:* | s390x:Linux:*:*)
979
- echo ${UNAME_MACHINE}-ibm-linux
1005
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
980
1006
  exit ;;
981
1007
  sh64*:Linux:*:*)
982
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1008
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
983
1009
  exit ;;
984
1010
  sh*:Linux:*:*)
985
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1011
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
986
1012
  exit ;;
987
1013
  sparc:Linux:*:* | sparc64:Linux:*:*)
988
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1014
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
989
1015
  exit ;;
990
1016
  tile*:Linux:*:*)
991
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1017
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
992
1018
  exit ;;
993
1019
  vax:Linux:*:*)
994
- echo ${UNAME_MACHINE}-dec-linux-gnu
1020
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
995
1021
  exit ;;
996
1022
  x86_64:Linux:*:*)
997
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1023
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
998
1024
  exit ;;
999
1025
  xtensa*:Linux:*:*)
1000
- echo ${UNAME_MACHINE}-unknown-linux-gnu
1026
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
1001
1027
  exit ;;
1002
1028
  i*86:DYNIX/ptx:4*:*)
1003
1029
  # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1201,6 +1227,9 @@ EOF
1201
1227
  BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
1202
1228
  echo i586-pc-haiku
1203
1229
  exit ;;
1230
+ x86_64:Haiku:*:*)
1231
+ echo x86_64-unknown-haiku
1232
+ exit ;;
1204
1233
  SX-4:SUPER-UX:*:*)
1205
1234
  echo sx4-nec-superux${UNAME_RELEASE}
1206
1235
  exit ;;
@@ -1227,19 +1256,31 @@ EOF
1227
1256
  exit ;;
1228
1257
  *:Darwin:*:*)
1229
1258
  UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1230
- case $UNAME_PROCESSOR in
1231
- i386)
1232
- eval $set_cc_for_build
1233
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1234
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1235
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1236
- grep IS_64BIT_ARCH >/dev/null
1237
- then
1238
- UNAME_PROCESSOR="x86_64"
1239
- fi
1240
- fi ;;
1241
- unknown) UNAME_PROCESSOR=powerpc ;;
1242
- esac
1259
+ eval $set_cc_for_build
1260
+ if test "$UNAME_PROCESSOR" = unknown ; then
1261
+ UNAME_PROCESSOR=powerpc
1262
+ fi
1263
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
1264
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
1265
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
1266
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
1267
+ grep IS_64BIT_ARCH >/dev/null
1268
+ then
1269
+ case $UNAME_PROCESSOR in
1270
+ i386) UNAME_PROCESSOR=x86_64 ;;
1271
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
1272
+ esac
1273
+ fi
1274
+ fi
1275
+ elif test "$UNAME_PROCESSOR" = i386 ; then
1276
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
1277
+ # that puts up a graphical alert prompting to install
1278
+ # developer tools. Any system running Mac OS X 10.7 or
1279
+ # later (Darwin 11 and later) is required to have a 64-bit
1280
+ # processor. This is not true of the ARM version of Darwin
1281
+ # that Apple uses in portable devices.
1282
+ UNAME_PROCESSOR=x86_64
1283
+ fi
1243
1284
  echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1244
1285
  exit ;;
1245
1286
  *:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1256,7 +1297,7 @@ EOF
1256
1297
  NEO-?:NONSTOP_KERNEL:*:*)
1257
1298
  echo neo-tandem-nsk${UNAME_RELEASE}
1258
1299
  exit ;;
1259
- NSE-?:NONSTOP_KERNEL:*:*)
1300
+ NSE-*:NONSTOP_KERNEL:*:*)
1260
1301
  echo nse-tandem-nsk${UNAME_RELEASE}
1261
1302
  exit ;;
1262
1303
  NSR-?:NONSTOP_KERNEL:*:*)
@@ -1330,9 +1371,6 @@ EOF
1330
1371
  exit ;;
1331
1372
  esac
1332
1373
 
1333
- #echo '(No uname command or uname output not recognized.)' 1>&2
1334
- #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
1335
-
1336
1374
  eval $set_cc_for_build
1337
1375
  cat >$dummy.c <<EOF
1338
1376
  #ifdef _SEQUENT_