Package: puf / 1.0.0-7

0003-Fix-gcc-4.1-optimization-issue.patch Patch series | download
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
From: Marco Nenciarini <[email protected]>
Date: Sat, 17 Feb 2007 13:18:41  0100
Subject: [PATCH] Fix gcc-4.1 optimization issue

Decleare all global static variables as volatile to fix gcc-4.1
optimization issue

Closes: #411069
---
 src/hostlist.c |    4   --
 src/http_req.c |    2  -
 src/url.c      |    6    ---
 3 files changed, 6 insertions( ), 6 deletions(-)

Index: b/src/hostlist.c
===================================================================
--- a/src/hostlist.c
    b/src/hostlist.c
@@ -13,8  13,8 @@
 
 int always_primary_name;
 
-static host_t *hostlist;	/*  list of known hosts  */
-static int real_num_hosts;
 static volatile host_t *hostlist;	/*  list of known hosts  */
 static volatile int real_num_hosts;
 
 whost_t *queue_dns_lookup;	/*  waiting for start of lookup  */
 dnsproc_t *list_dns_busy, *list_dns_idle;	/*  helper processes  */
Index: b/src/http_req.c
===================================================================
--- a/src/http_req.c
    b/src/http_req.c
@@ -11,7  11,7 @@
 
 #include "puf.h"
 
-static char *user_agent;
 static volatile char *user_agent;
 
 void 
 init_user_agent(void)
Index: b/src/url.c
===================================================================
--- a/src/url.c
    b/src/url.c
@@ -12,9  12,9 @@
 #include "puf.h"
 
 int economize_dns;
-static url_t *urllist;
-static int real_num_urls;
-static proxy_t *proxylist;
 static volatile url_t *urllist;
 static volatile int real_num_urls;
 static volatile proxy_t *proxylist;
 
 /*  calculate hash code for given url. eliminate duplicates  */
 int