]> git.pld-linux.org Git - packages/gawk.git/blob - gawk-unaligned.patch
- use ${TEMDIR:-/tmp} instead /tmp in base directory name for temporary files.
[packages/gawk.git] / gawk-unaligned.patch
1
2 From davidm@AZStarNet.com Mon Sep  2 10:39:42 1996
3 Date: Sun, 1 Sep 1996 21:06:10 -0700
4 From: David Mosberger-Tang <davidm@AZStarNet.com>
5 To: ewt@redhat.com
6 Cc: richard@atheist.tamu.edu
7 Subject: awk fix
8
9 The patch below fixes the unaligned accesses.  This is a genuine bug,
10 so it's better to fix it asap (not that unaligned accesses are not
11 worth fixing...).
12
13 The problem is as follows: re_syntax_options is a bss symbol in libc
14 that is 4 bytes long.  GNU awk comes with its own regex.{h,c} files
15 and there, that variable is declared as an `unsigned long' common
16 symbol.  The runtimes linker then resolves that symbol to the instance
17 in the shared library.  So gawk accesses that variable as a "long"
18 while in reality it's just 4 bytes long.
19
20 Actually, the linker warns about this.  Probably good to keep an eye
21 open for these:
22
23 ld: Warning: size of symbol `re_syntax_options' changed from 8 to 4 in /lib/libc.so.6
24
25         --david
26
27 --- gawk-3.0.0/regex.c.~1~      Fri Dec 15 04:53:05 1995
28 +++ gawk-3.0.0/regex.c  Sun Sep  1 19:10:54 1996
29 @@ -920,7 +920,7 @@
30     syntax, so it can be changed between regex compilations.  */
31  /* This has no initializer because initialized variables in Emacs
32     become read-only after dumping.  */
33 -reg_syntax_t re_syntax_options;
34 +reg_syntax_t re_syntax_options = 0;
35  
36  
37  /* Specify the precise syntax of regexps for compilation.  This provides
This page took 0.707241 seconds and 3 git commands to generate.