Skip to content

Commit

Permalink
Fix mingw building
Browse files Browse the repository at this point in the history
  • Loading branch information
madeye committed Sep 9, 2016
1 parent e5c3254 commit 96dda0e
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 2 deletions.
21 changes: 21 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -12149,6 +12149,27 @@ if test "$enable_pcre" != "no"; then
fi


if test "x$CFLAGS" = "x"; then
test "x$verbose" = "xyes" && echo " setting CFLAGS to \"-DPCRE_STATIC\""
CFLAGS="-DPCRE_STATIC"
else
ats_addto_bugger="-DPCRE_STATIC"
for i in $ats_addto_bugger; do
ats_addto_duplicate="0"
for j in $CFLAGS; do
if test "x$i" = "x$j"; then
ats_addto_duplicate="1"
break
fi
done
if test $ats_addto_duplicate = "0"; then
test "x$verbose" = "xyes" && echo " adding \"$i\" to CFLAGS"
CFLAGS="$CFLAGS $i"
fi
done
fi


if test "x$LDFLAGS" = "x"; then
test "x$verbose" = "xyes" && echo " setting LDFLAGS to \"-L${pcre_ldflags}\""
LDFLAGS="-L${pcre_ldflags}"
Expand Down
1 change: 1 addition & 0 deletions m4/pcre.m4
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ if test "$enable_pcre" != "no"; then
pcre_have_libs=0
if test "$pcre_base_dir" != "/usr"; then
TS_ADDTO(CFLAGS, [-I${pcre_include}])
TS_ADDTO(CFLAGS, [-DPCRE_STATIC])
TS_ADDTO(LDFLAGS, [-L${pcre_ldflags}])
TS_ADDTO_RPATH(${pcre_ldflags})
fi
Expand Down
6 changes: 6 additions & 0 deletions src/http.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,17 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdio.h>
#include <stdlib.h> /* malloc() */
#include <string.h> /* strncpy() */
#include <strings.h> /* strncasecmp() */
#include <ctype.h> /* isblank() */

#include "http.h"
#include "protocol.h"

Expand Down
9 changes: 9 additions & 0 deletions src/rule.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,18 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdio.h>
#include <string.h>

#ifdef __MINGW32__
extern void ss_error(const char *s);
#endif

#include "rule.h"
#include "utils.h"

Expand Down
2 changes: 0 additions & 2 deletions src/rule.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "config.h"
#endif

#include <libcork/core.h>
#include <libcork/ds.h>

#ifdef HAVE_PCRE_H
Expand All @@ -56,5 +55,4 @@ void remove_rule(rule_t *);
rule_t *new_rule();
int accept_rule_arg(rule_t *, const char *);


#endif
10 changes: 10 additions & 0 deletions src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@
* extension. This was created based primarily on Wireshark dissection of a
* TLS handshake and RFC4366.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdio.h>
#include <stdlib.h> /* malloc() */
#include <string.h> /* strncpy() */

#ifndef __MINGW32__
#include <sys/socket.h>
#else
#include <win32.h>
#endif

#include "tls.h"
#include "protocol.h"
Expand Down

0 comments on commit 96dda0e

Please sign in to comment.