View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002885 | libmicrohttpd | portability | public | 2013-05-18 21:10 | 2013-07-19 13:36 |
| Reporter | bratao | Assigned To | Christian Grothoff | ||
| Priority | normal | Severity | major | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | MINGW | OS | Windows | OS Version | 8 |
| Product Version | Git master | ||||
| Target Version | 0.9.28 | Fixed in Version | 0.9.28 | ||
| Summary | 0002885: Fail to build in Minfw | ||||
| Description | The latest build fails on Mingw. Attached patch to fix this. - ifdef pipe related function in MINGW. - use unsigned int in place of uint. - DATADIR is already definied by an W32 library. Renamed it. | ||||
| Tags | No tags attached. | ||||
| Attached Files | compile_in_mingw.patch (13,340 bytes)
Index: src/examples/demo.c
===================================================================
--- src/examples/demo.c (revision 27205)
+++ src/examples/demo.c (working copy)
@@ -796,6 +796,7 @@
/**
* setup handlers to ignore SIGPIPE.
*/
+#ifndef MINGW
static void
ignore_sigpipe ()
{
@@ -813,8 +814,8 @@
fprintf (stderr,
"Failed to install SIGPIPE handler: %s\n", strerror (errno));
}
+#endif
-
/**
* Entry point to demo. Note: this HTTP server will make all
* files in the current directory and its subdirectories available
@@ -838,7 +839,9 @@
"%s PORT\n", argv[0]);
return 1;
}
+ #ifndef MINGW
ignore_sigpipe ();
+ #endif
magic = magic_open (MAGIC_MIME_TYPE);
(void) magic_load (magic, NULL);
Index: src/examples/Makefile.am
===================================================================
--- src/examples/Makefile.am (revision 27205)
+++ src/examples/Makefile.am (working copy)
@@ -9,7 +9,7 @@
-I$(top_srcdir)/src/include \
@LIBGCRYPT_CFLAGS@
-AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\"
+AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
if USE_COVERAGE
AM_CFLAGS += --coverage
Index: src/examples/spdy_event_loop.c
===================================================================
--- src/examples/spdy_event_loop.c (revision 27205)
+++ src/examples/spdy_event_loop.c (working copy)
@@ -35,7 +35,7 @@
#include "microspdy.h"
#include <sys/time.h>
#include <time.h>
-#include <arpa/inet.h>
+//#include <arpa/inet.h>
//#include "../framinglayer/structures.h"
//#include "../applicationlayer/alstructures.h"
@@ -259,8 +259,10 @@
{
if(argc != 2) return 1;
- if (signal(SIGPIPE, sig_handler) == SIG_ERR)
- printf("\ncan't catch SIGPIPE\n");
+ #ifndef MINGW
+ if (signal(SIGPIPE, sig_handler) == SIG_ERR)
+ printf("\ncan't catch SIGPIPE\n");
+ #endif
SPDY_init();
@@ -272,8 +274,8 @@
addr4.sin_port = htons(atoi(argv[1]));
struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]),
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_callback,&session_closed_handler,&standard_request_handler,NULL,NULL,
SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 10,
//SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr4,
@@ -290,8 +292,8 @@
addr6.sin6_port = htons(atoi(argv[1]) + 1);
struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_callback,NULL,&standard_request_handler,NULL,&main,
//SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 0,
//SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr6,
Index: src/examples/spdy_fileserver.c
===================================================================
--- src/examples/spdy_fileserver.c (revision 27205)
+++ src/examples/spdy_fileserver.c (working copy)
@@ -40,7 +40,7 @@
#define GET_MIME_TYPE(fname, mime) do {\
- uint __len = strlen(fname);\
+ unsigned int __len = strlen(fname);\
if (__len < 4 || '.' != (fname)[__len - 4]) break;\
const char * __ext = &(fname)[__len - 3];\
if(0 == strcmp(__ext, "jpg")) (mime) = strdup("image/jpeg");\
Index: src/examples/spdy_response_with_callback.c
===================================================================
--- src/examples/spdy_response_with_callback.c (revision 27205)
+++ src/examples/spdy_response_with_callback.c (working copy)
@@ -92,7 +92,7 @@
printf("received request for '%s %s %s'\n", method, path, version);
if(strcmp(path,"/spdy-draft.txt")==0)
{
- FILE *fd = fopen(DATADIR "spdy-draft.txt","r");
+ FILE *fd = fopen(DATA_DIR "spdy-draft.txt","r");
if(NULL == (resp_headers = SPDY_name_value_create()))
{
@@ -161,8 +161,8 @@
SPDY_init();
daemon = SPDY_start_daemon(atoi(argv[1]),
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
Index: src/include/microspdy.h
===================================================================
--- src/include/microspdy.h (revision 27205)
+++ src/include/microspdy.h (working copy)
@@ -51,6 +51,11 @@
#include <zlib.h>
#include <stdbool.h>
+#ifdef __MINGW32__
+#include <ws2tcpip.h>
+#endif
+
+
/**
* return code for "YES".
*/
Index: src/microspdy/applicationlayer.c
===================================================================
--- src/microspdy/applicationlayer.c (revision 27205)
+++ src/microspdy/applicationlayer.c (working copy)
@@ -44,7 +44,7 @@
struct SPDYF_Stream * stream)
{
(void)cls;
- uint i;
+ unsigned int i;
char *method = NULL;
char *path = NULL;
char *version = NULL;
Index: src/microspdy/compression.c
===================================================================
--- src/microspdy/compression.c (revision 27205)
+++ src/microspdy/compression.c (working copy)
@@ -256,7 +256,7 @@
{
int ret;
int flush;
- uint have;
+ unsigned int have;
Bytef out[SPDYF_ZLIB_CHUNK];
*dest = NULL;
Index: src/microspdy/session.c
===================================================================
--- src/microspdy/session.c (revision 27205)
+++ src/microspdy/session.c (working copy)
@@ -44,7 +44,7 @@
spdyf_handler_read_syn_stream (struct SPDY_Session *session)
{
size_t name_value_strm_size = 0;
- uint compressed_data_size;
+ unsigned int compressed_data_size;
int ret;
void *name_value_strm = NULL;
struct SPDYF_Control_Frame *frame;
Index: src/microspdy/structures.c
===================================================================
--- src/microspdy/structures.c (revision 27205)
+++ src/microspdy/structures.c (working copy)
@@ -48,8 +48,8 @@
const char *name,
const char *value)
{
- uint i;
- uint len;
+ unsigned int i;
+ unsigned int len;
struct SPDY_NameValue *pair;
struct SPDY_NameValue *temp;
char **temp_value;
@@ -202,7 +202,7 @@
void
SPDY_name_value_destroy (struct SPDY_NameValue *container)
{
- uint i;
+ unsigned int i;
struct SPDY_NameValue *temp = container;
while(NULL != temp)
@@ -286,7 +286,7 @@
struct SPDYF_Response_Queue *response_to_queue;
struct SPDYF_Control_Frame *control_frame;
struct SPDYF_Data_Frame *data_frame;
- uint i;
+ unsigned int i;
bool is_last;
SPDYF_ASSERT(!is_data
@@ -444,9 +444,9 @@
int32_t value_size;
int32_t name_size;
int32_t temp;
- uint i;
- uint offset;
- uint value_offset;
+ unsigned int i;
+ unsigned int offset;
+ unsigned int value_offset;
struct SPDY_NameValue * iterator;
int j;
@@ -533,8 +533,8 @@
int32_t value_size;
int32_t name_size;
int i;
- uint offset = 0;
- uint value_end_offset;
+ unsigned int offset = 0;
+ unsigned int value_end_offset;
char *name;
char *value;
Index: src/microspdy/structures.h
===================================================================
--- src/microspdy/structures.h (revision 27205)
+++ src/microspdy/structures.h (working copy)
@@ -487,7 +487,7 @@
/**
* Number of values, this is >= 0.
*/
- uint num_values;
+ unsigned int num_values;
};
Index: src/spdy2http/Makefile.am
===================================================================
--- src/spdy2http/Makefile.am (revision 27205)
+++ src/spdy2http/Makefile.am (working copy)
@@ -1,6 +1,6 @@
SUBDIRS = .
-AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\"
+AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
if USE_COVERAGE
AM_CFLAGS += -fprofile-arcs -ftest-coverage
Index: src/testspdy/Makefile.am
===================================================================
--- src/testspdy/Makefile.am (revision 27205)
+++ src/testspdy/Makefile.am (working copy)
@@ -1,6 +1,6 @@
SUBDIRS = .
-AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\"
+AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
if USE_COVERAGE
AM_CFLAGS += -fprofile-arcs -ftest-coverage
Index: src/testspdy/test_daemon_start_stop.c
===================================================================
--- src/testspdy/test_daemon_start_stop.c (revision 27205)
+++ src/testspdy/test_daemon_start_stop.c (working copy)
@@ -32,8 +32,8 @@
SPDY_init();
struct SPDY_Daemon *daemon = SPDY_start_daemon(get_port(16123),
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END);
if(NULL==daemon){
Index: src/testspdy/test_daemon_start_stop_many.c
===================================================================
--- src/testspdy/test_daemon_start_stop_many.c (revision 27205)
+++ src/testspdy/test_daemon_start_stop_many.c (working copy)
@@ -43,8 +43,8 @@
for(j=0;j<num_daemons;++j)
{
daemon[j] = SPDY_start_daemon(port + j,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END);
if(NULL==daemon[j]){
Index: src/testspdy/test_misc.c
===================================================================
--- src/testspdy/test_misc.c (revision 27205)
+++ src/testspdy/test_misc.c (working copy)
@@ -196,8 +196,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
Index: src/testspdy/test_new_connection.c
===================================================================
--- src/testspdy/test_new_connection.c (revision 27205)
+++ src/testspdy/test_new_connection.c (working copy)
@@ -889,8 +889,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_callback,NULL,NULL,NULL,CLS,SPDY_DAEMON_OPTION_END);
if(NULL==daemon){
Index: src/testspdy/test_request_response.c
===================================================================
--- src/testspdy/test_request_response.c (revision 27205)
+++ src/testspdy/test_request_response.c (working copy)
@@ -900,8 +900,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,&session_closed_handler,&standard_request_handler,NULL,CLS,SPDY_DAEMON_OPTION_END);
if(NULL==daemon){
Index: src/testspdy/test_request_response_with_callback.c
===================================================================
--- src/testspdy/test_request_response_with_callback.c (revision 27205)
+++ src/testspdy/test_request_response_with_callback.c (working copy)
@@ -114,7 +114,7 @@
printf("received request for '%s %s %s'\n", method, path, version);
- FILE *fd = fopen(DATADIR "spdy-draft.txt","r");
+ FILE *fd = fopen(DATA_DIR "spdy-draft.txt","r");
if(NULL == (resp_headers = SPDY_name_value_create()))
{
@@ -161,8 +161,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
@@ -257,7 +257,7 @@
uint64_t usecs;
asprintf(&cmd1, "spdycat https://127.0.0.1:%i/ | md5sum",port);
- asprintf(&cmd2, "md5sum " DATADIR "spdy-draft.txt");
+ asprintf(&cmd2, "md5sum " DATA_DIR "spdy-draft.txt");
gettimeofday(&tv1, NULL);
md5(cmd1,md5_sum1);
@@ -268,7 +268,7 @@
printf("original file md5: %s\n", md5_sum2);
ret = strcmp(md5_sum1, md5_sum2);
- if(0 == ret && 0 == stat(DATADIR "spdy-draft.txt", &st))
+ if(0 == ret && 0 == stat(DATA_DIR "spdy-draft.txt", &st))
{
usecs = (uint64_t)1000000 * (uint64_t)(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec;
printf("%i bytes read in %i usecs\n", st.st_size, usecs);
Index: src/testspdy/test_requests_with_assets.c
===================================================================
--- src/testspdy/test_requests_with_assets.c (revision 27205)
+++ src/testspdy/test_requests_with_assets.c (working copy)
@@ -213,8 +213,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
Index: src/testspdy/test_session_timeout.c
===================================================================
--- src/testspdy/test_session_timeout.c (revision 27205)
+++ src/testspdy/test_session_timeout.c (working copy)
@@ -105,8 +105,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_cb,
&closed_session_cb,
NULL,
compile_in_mingw2.patch (13,337 bytes)
Index: src/examples/demo.c
===================================================================
--- src/examples/demo.c (revision 27205)
+++ src/examples/demo.c (working copy)
@@ -796,6 +796,7 @@
/**
* setup handlers to ignore SIGPIPE.
*/
+#ifndef MINGW
static void
ignore_sigpipe ()
{
@@ -813,8 +814,8 @@
fprintf (stderr,
"Failed to install SIGPIPE handler: %s\n", strerror (errno));
}
+#endif
-
/**
* Entry point to demo. Note: this HTTP server will make all
* files in the current directory and its subdirectories available
@@ -838,7 +839,9 @@
"%s PORT\n", argv[0]);
return 1;
}
+ #ifndef MINGW
ignore_sigpipe ();
+ #endif
magic = magic_open (MAGIC_MIME_TYPE);
(void) magic_load (magic, NULL);
Index: src/examples/Makefile.am
===================================================================
--- src/examples/Makefile.am (revision 27205)
+++ src/examples/Makefile.am (working copy)
@@ -9,7 +9,7 @@
-I$(top_srcdir)/src/include \
@LIBGCRYPT_CFLAGS@
-AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\"
+AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
if USE_COVERAGE
AM_CFLAGS += --coverage
Index: src/examples/spdy_event_loop.c
===================================================================
--- src/examples/spdy_event_loop.c (revision 27205)
+++ src/examples/spdy_event_loop.c (working copy)
@@ -35,7 +35,9 @@
#include "microspdy.h"
#include <sys/time.h>
#include <time.h>
+#ifndef MINGW
#include <arpa/inet.h>
+#endif
//#include "../framinglayer/structures.h"
//#include "../applicationlayer/alstructures.h"
@@ -259,8 +261,10 @@
{
if(argc != 2) return 1;
- if (signal(SIGPIPE, sig_handler) == SIG_ERR)
- printf("\ncan't catch SIGPIPE\n");
+ #ifndef MINGW
+ if (signal(SIGPIPE, sig_handler) == SIG_ERR)
+ printf("\ncan't catch SIGPIPE\n");
+ #endif
SPDY_init();
@@ -272,8 +276,8 @@
addr4.sin_port = htons(atoi(argv[1]));
struct SPDY_Daemon *daemon = SPDY_start_daemon(atoi(argv[1]),
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_callback,&session_closed_handler,&standard_request_handler,NULL,NULL,
SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 10,
//SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr4,
@@ -290,8 +294,8 @@
addr6.sin6_port = htons(atoi(argv[1]) + 1);
struct SPDY_Daemon *daemon2 = SPDY_start_daemon(atoi(argv[1]) + 1,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_callback,NULL,&standard_request_handler,NULL,&main,
//SPDY_DAEMON_OPTION_SESSION_TIMEOUT, 0,
//SPDY_DAEMON_OPTION_SOCK_ADDR, (struct sockaddr *)&addr6,
Index: src/examples/spdy_fileserver.c
===================================================================
--- src/examples/spdy_fileserver.c (revision 27205)
+++ src/examples/spdy_fileserver.c (working copy)
@@ -40,7 +40,7 @@
#define GET_MIME_TYPE(fname, mime) do {\
- uint __len = strlen(fname);\
+ unsigned int __len = strlen(fname);\
if (__len < 4 || '.' != (fname)[__len - 4]) break;\
const char * __ext = &(fname)[__len - 3];\
if(0 == strcmp(__ext, "jpg")) (mime) = strdup("image/jpeg");\
Index: src/examples/spdy_response_with_callback.c
===================================================================
--- src/examples/spdy_response_with_callback.c (revision 27205)
+++ src/examples/spdy_response_with_callback.c (working copy)
@@ -92,7 +92,7 @@
printf("received request for '%s %s %s'\n", method, path, version);
if(strcmp(path,"/spdy-draft.txt")==0)
{
- FILE *fd = fopen(DATADIR "spdy-draft.txt","r");
+ FILE *fd = fopen(DATA_DIR "spdy-draft.txt","r");
if(NULL == (resp_headers = SPDY_name_value_create()))
{
@@ -161,8 +161,8 @@
SPDY_init();
daemon = SPDY_start_daemon(atoi(argv[1]),
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
Index: src/include/microspdy.h
===================================================================
--- src/include/microspdy.h (revision 27205)
+++ src/include/microspdy.h (working copy)
@@ -51,6 +51,11 @@
#include <zlib.h>
#include <stdbool.h>
+#ifdef __MINGW32__
+#include <ws2tcpip.h>
+#endif
+
+
/**
* return code for "YES".
*/
Index: src/microspdy/applicationlayer.c
===================================================================
--- src/microspdy/applicationlayer.c (revision 27205)
+++ src/microspdy/applicationlayer.c (working copy)
@@ -44,7 +44,7 @@
struct SPDYF_Stream * stream)
{
(void)cls;
- uint i;
+ unsigned int i;
char *method = NULL;
char *path = NULL;
char *version = NULL;
Index: src/microspdy/compression.c
===================================================================
--- src/microspdy/compression.c (revision 27205)
+++ src/microspdy/compression.c (working copy)
@@ -256,7 +256,7 @@
{
int ret;
int flush;
- uint have;
+ unsigned int have;
Bytef out[SPDYF_ZLIB_CHUNK];
*dest = NULL;
Index: src/microspdy/session.c
===================================================================
--- src/microspdy/session.c (revision 27205)
+++ src/microspdy/session.c (working copy)
@@ -44,7 +44,7 @@
spdyf_handler_read_syn_stream (struct SPDY_Session *session)
{
size_t name_value_strm_size = 0;
- uint compressed_data_size;
+ unsigned int compressed_data_size;
int ret;
void *name_value_strm = NULL;
struct SPDYF_Control_Frame *frame;
Index: src/microspdy/structures.c
===================================================================
--- src/microspdy/structures.c (revision 27205)
+++ src/microspdy/structures.c (working copy)
@@ -48,8 +48,8 @@
const char *name,
const char *value)
{
- uint i;
- uint len;
+ unsigned int i;
+ unsigned int len;
struct SPDY_NameValue *pair;
struct SPDY_NameValue *temp;
char **temp_value;
@@ -202,7 +202,7 @@
void
SPDY_name_value_destroy (struct SPDY_NameValue *container)
{
- uint i;
+ unsigned int i;
struct SPDY_NameValue *temp = container;
while(NULL != temp)
@@ -286,7 +286,7 @@
struct SPDYF_Response_Queue *response_to_queue;
struct SPDYF_Control_Frame *control_frame;
struct SPDYF_Data_Frame *data_frame;
- uint i;
+ unsigned int i;
bool is_last;
SPDYF_ASSERT(!is_data
@@ -444,9 +444,9 @@
int32_t value_size;
int32_t name_size;
int32_t temp;
- uint i;
- uint offset;
- uint value_offset;
+ unsigned int i;
+ unsigned int offset;
+ unsigned int value_offset;
struct SPDY_NameValue * iterator;
int j;
@@ -533,8 +533,8 @@
int32_t value_size;
int32_t name_size;
int i;
- uint offset = 0;
- uint value_end_offset;
+ unsigned int offset = 0;
+ unsigned int value_end_offset;
char *name;
char *value;
Index: src/microspdy/structures.h
===================================================================
--- src/microspdy/structures.h (revision 27205)
+++ src/microspdy/structures.h (working copy)
@@ -487,7 +487,7 @@
/**
* Number of values, this is >= 0.
*/
- uint num_values;
+ unsigned int num_values;
};
Index: src/spdy2http/Makefile.am
===================================================================
--- src/spdy2http/Makefile.am (revision 27205)
+++ src/spdy2http/Makefile.am (working copy)
@@ -1,6 +1,6 @@
SUBDIRS = .
-AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\"
+AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
if USE_COVERAGE
AM_CFLAGS += -fprofile-arcs -ftest-coverage
Index: src/testspdy/Makefile.am
===================================================================
--- src/testspdy/Makefile.am (revision 27205)
+++ src/testspdy/Makefile.am (working copy)
@@ -1,6 +1,6 @@
SUBDIRS = .
-AM_CFLAGS = -DDATADIR=\"$(top_srcdir)/src/datadir/\"
+AM_CFLAGS = -DDATA_DIR=\"$(top_srcdir)/src/datadir/\"
if USE_COVERAGE
AM_CFLAGS += -fprofile-arcs -ftest-coverage
Index: src/testspdy/test_daemon_start_stop.c
===================================================================
--- src/testspdy/test_daemon_start_stop.c (revision 27205)
+++ src/testspdy/test_daemon_start_stop.c (working copy)
@@ -32,8 +32,8 @@
SPDY_init();
struct SPDY_Daemon *daemon = SPDY_start_daemon(get_port(16123),
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END);
if(NULL==daemon){
Index: src/testspdy/test_daemon_start_stop_many.c
===================================================================
--- src/testspdy/test_daemon_start_stop_many.c (revision 27205)
+++ src/testspdy/test_daemon_start_stop_many.c (working copy)
@@ -43,8 +43,8 @@
for(j=0;j<num_daemons;++j)
{
daemon[j] = SPDY_start_daemon(port + j,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,NULL,NULL,NULL,NULL,SPDY_DAEMON_OPTION_END);
if(NULL==daemon[j]){
Index: src/testspdy/test_misc.c
===================================================================
--- src/testspdy/test_misc.c (revision 27205)
+++ src/testspdy/test_misc.c (working copy)
@@ -196,8 +196,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
Index: src/testspdy/test_new_connection.c
===================================================================
--- src/testspdy/test_new_connection.c (revision 27205)
+++ src/testspdy/test_new_connection.c (working copy)
@@ -889,8 +889,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_callback,NULL,NULL,NULL,CLS,SPDY_DAEMON_OPTION_END);
if(NULL==daemon){
Index: src/testspdy/test_request_response.c
===================================================================
--- src/testspdy/test_request_response.c (revision 27205)
+++ src/testspdy/test_request_response.c (working copy)
@@ -900,8 +900,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,&session_closed_handler,&standard_request_handler,NULL,CLS,SPDY_DAEMON_OPTION_END);
if(NULL==daemon){
Index: src/testspdy/test_request_response_with_callback.c
===================================================================
--- src/testspdy/test_request_response_with_callback.c (revision 27205)
+++ src/testspdy/test_request_response_with_callback.c (working copy)
@@ -114,7 +114,7 @@
printf("received request for '%s %s %s'\n", method, path, version);
- FILE *fd = fopen(DATADIR "spdy-draft.txt","r");
+ FILE *fd = fopen(DATA_DIR "spdy-draft.txt","r");
if(NULL == (resp_headers = SPDY_name_value_create()))
{
@@ -161,8 +161,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
@@ -257,7 +257,7 @@
uint64_t usecs;
asprintf(&cmd1, "spdycat https://127.0.0.1:%i/ | md5sum",port);
- asprintf(&cmd2, "md5sum " DATADIR "spdy-draft.txt");
+ asprintf(&cmd2, "md5sum " DATA_DIR "spdy-draft.txt");
gettimeofday(&tv1, NULL);
md5(cmd1,md5_sum1);
@@ -268,7 +268,7 @@
printf("original file md5: %s\n", md5_sum2);
ret = strcmp(md5_sum1, md5_sum2);
- if(0 == ret && 0 == stat(DATADIR "spdy-draft.txt", &st))
+ if(0 == ret && 0 == stat(DATA_DIR "spdy-draft.txt", &st))
{
usecs = (uint64_t)1000000 * (uint64_t)(tv2.tv_sec - tv1.tv_sec) + tv2.tv_usec - tv1.tv_usec;
printf("%i bytes read in %i usecs\n", st.st_size, usecs);
Index: src/testspdy/test_requests_with_assets.c
===================================================================
--- src/testspdy/test_requests_with_assets.c (revision 27205)
+++ src/testspdy/test_requests_with_assets.c (working copy)
@@ -213,8 +213,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
NULL,
NULL,
&standard_request_handler,
Index: src/testspdy/test_session_timeout.c
===================================================================
--- src/testspdy/test_session_timeout.c (revision 27205)
+++ src/testspdy/test_session_timeout.c (working copy)
@@ -105,8 +105,8 @@
SPDY_init();
daemon = SPDY_start_daemon(port,
- DATADIR "cert-and-key.pem",
- DATADIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
+ DATA_DIR "cert-and-key.pem",
&new_session_cb,
&closed_session_cb,
NULL,
| ||||
|
|
Ops, I commented something that should be ifdef'ed. Sent version 2 |
|
|
Fixed in SVN 27206 as suggested. |
|
|
grothoff, seems like some files were modified my mistake. Like INSTALL, config.sub and texinfo.tex. It was reverted to older versions. |
|
|
Yeah, I noticed, doesn't matter. Will be fixed once I'm on another system. Maybe those shouldn't be checked in in the first place... |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2013-05-18 21:10 | bratao | New Issue | |
| 2013-05-18 21:10 | bratao | File Added: compile_in_mingw.patch | |
| 2013-05-18 21:12 | bratao | File Added: compile_in_mingw2.patch | |
| 2013-05-18 21:13 | bratao | Note Added: 0007103 | |
| 2013-05-18 22:33 | Christian Grothoff | Note Added: 0007104 | |
| 2013-05-18 22:33 | Christian Grothoff | Status | new => resolved |
| 2013-05-18 22:33 | Christian Grothoff | Resolution | open => fixed |
| 2013-05-18 22:33 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2013-05-18 22:33 | Christian Grothoff | Product Version | => Git master |
| 2013-05-18 22:33 | Christian Grothoff | Fixed in Version | => 0.9.28 |
| 2013-05-18 22:33 | Christian Grothoff | Target Version | => 0.9.28 |
| 2013-05-18 22:51 | bratao | Note Added: 0007105 | |
| 2013-05-18 22:51 | bratao | Status | resolved => feedback |
| 2013-05-18 22:51 | bratao | Resolution | fixed => reopened |
| 2013-05-18 23:01 | Christian Grothoff | Note Added: 0007106 | |
| 2013-05-18 23:01 | Christian Grothoff | Status | feedback => resolved |
| 2013-05-18 23:01 | Christian Grothoff | Resolution | reopened => fixed |
| 2013-07-19 13:36 | Christian Grothoff | Status | resolved => closed |