Skip to content

Commit 690ec87

Browse files
committed
Merge pull request #98 from SRombauts/master
Fix for building with Visual Studio
2 parents 975df62 + 37712fd commit 690ec87

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

html/html_smartypants.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#include <stdio.h>
2323
#include <ctype.h>
2424

25+
#if defined(_WIN32)
26+
#define snprintf _snprintf
27+
#endif
28+
2529
struct smartypants_data {
2630
int in_squote;
2731
int in_dquote;

src/autolink.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
#include <stdio.h>
2222
#include <ctype.h>
2323

24+
#if defined(_WIN32)
25+
#define strncasecmp _strnicmp
26+
#endif
27+
2428
int
2529
sd_autolink_issafe(const uint8_t *link, size_t link_len)
2630
{

src/markdown.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
#include <ctype.h>
2626
#include <stdio.h>
2727

28+
#if defined(_WIN32)
29+
#define strncasecmp _strnicmp
30+
#endif
31+
2832
#define REF_TABLE_SIZE 8
2933

3034
#define BUFFER_BLOCK 0

0 commit comments

Comments
 (0)