aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--configure.in2
-rw-r--r--dlib/dlib.c6
-rw-r--r--src/cache.c3
-rw-r--r--src/decode.c2
-rw-r--r--src/dns.c3
6 files changed, 14 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 50e50e37..9155e534 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@ dillo-2.1
Patches: place (AKA corvid)
+- Switched SSL enabled to configure.in (./configure --enable-ssl).
Patch: Jeremy Henty
++- Allowed compilation with older machines by removing a few C99isms.
+ - Added use of inttypes.h when stdint.h isn't found.
+ Patches: Dan Fandrich
dw
diff --git a/configure.in b/configure.in
index 85790df5..58ee8724 100644
--- a/configure.in
+++ b/configure.in
@@ -70,6 +70,8 @@ cat >d_size.h <<_______EOF
#if HAVE_STDINT_H == 0
#include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+#include <inttypes.h>
#else
typedef signed $gint16 int16_t;
typedef unsigned $gint16 uint16_t;
diff --git a/dlib/dlib.c b/dlib/dlib.c
index f92f64e7..76797af5 100644
--- a/dlib/dlib.c
+++ b/dlib/dlib.c
@@ -204,10 +204,11 @@ static void dStr_resize(Dstr *ds, int n_sz, int keep)
*/
Dstr *dStr_sized_new (int sz)
{
+ Dstr *ds;
if (sz < 2)
sz = 2;
- Dstr *ds = dNew(Dstr, 1);
+ ds = dNew(Dstr, 1);
ds->str = NULL;
dStr_resize(ds, sz + 1, 0); /* (sz + 1) for the extra '\0' */
return ds;
@@ -476,10 +477,11 @@ const char *dStr_printable(Dstr *in, int maxlen)
*/
Dlist *dList_new(int size)
{
+ Dlist *l;
if (size <= 0)
return NULL;
- Dlist *l = dNew(Dlist, 1);
+ l = dNew(Dlist, 1);
l->len = 0;
l->sz = size;
l->list = dNew(void*, l->sz);
diff --git a/src/cache.c b/src/cache.c
index 370d4140..a6342da1 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -513,8 +513,9 @@ int a_Cache_get_buf(const DilloUrl *Url, char **PBuf, int *BufSize)
{
CacheEntry_t *entry = Cache_entry_search_with_redirect(Url);
if (entry) {
+ Dstr *data;
Cache_ref_data(entry);
- Dstr *data = Cache_data(entry);
+ data = Cache_data(entry);
*PBuf = data->str;
*BufSize = data->len;
} else {
diff --git a/src/decode.c b/src/decode.c
index ff4fcb27..d22f939b 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -221,9 +221,9 @@ Decode *a_Decode_content_init(const char *format)
if (format && *format) {
if (!dStrcasecmp(format, "gzip") || !dStrcasecmp(format, "x-gzip")) {
+ z_stream *zs;
_MSG("gzipped data!\n");
- z_stream *zs;
dc = dNew(Decode, 1);
dc->buffer = dNew(char, bufsize);
dc->state = zs = dNew(z_stream, 1);
diff --git a/src/dns.c b/src/dns.c
index c783366f..4ff2cb76 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -267,12 +267,13 @@ static void *Dns_server(void *data)
int channel = VOIDP2INT(data);
struct addrinfo hints, *res0;
int error;
+ Dlist *hosts;
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_STREAM;
- Dlist *hosts = dList_new(2);
+ hosts = dList_new(2);
_MSG("Dns_server: starting...\n ch: %d host: %s\n",
channel, dns_server[channel].hostname);