Compile on windows
- include <stdlib.h> - export file - fill out structs to make it compile with visual studio Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
This commit is contained in:

committed by
Love Hornquist Astrand

parent
c9fdd77bc8
commit
1d624801c1
@@ -70,6 +70,7 @@ extern const size_t _wind_l_table_size;
|
|||||||
|
|
||||||
bidi_c.file.write(
|
bidi_c.file.write(
|
||||||
'''
|
'''
|
||||||
|
#include <stdlib.h>
|
||||||
#include "bidi_table.h"
|
#include "bidi_table.h"
|
||||||
|
|
||||||
''')
|
''')
|
||||||
|
@@ -73,6 +73,7 @@ extern const size_t _wind_combining_table_size;
|
|||||||
|
|
||||||
combining_c.file.write(
|
combining_c.file.write(
|
||||||
'''
|
'''
|
||||||
|
#include <stdlib.h>
|
||||||
#include "combining_table.h"
|
#include "combining_table.h"
|
||||||
|
|
||||||
const struct translation _wind_combining_table[] = {
|
const struct translation _wind_combining_table[] = {
|
||||||
|
@@ -77,6 +77,7 @@ extern const size_t _wind_errorlist_table_size;
|
|||||||
|
|
||||||
errorlist_c.file.write(
|
errorlist_c.file.write(
|
||||||
'''
|
'''
|
||||||
|
#include <stdlib.h>
|
||||||
#include "errorlist_table.h"
|
#include "errorlist_table.h"
|
||||||
|
|
||||||
const struct error_entry _wind_errorlist_table[] = {
|
const struct error_entry _wind_errorlist_table[] = {
|
||||||
|
@@ -97,6 +97,7 @@ extern const unsigned short _wind_canon_next_table[];
|
|||||||
|
|
||||||
normalize_c.file.write(
|
normalize_c.file.write(
|
||||||
'''
|
'''
|
||||||
|
#include <stdlib.h>
|
||||||
#include "normalize_table.h"
|
#include "normalize_table.h"
|
||||||
|
|
||||||
const struct translation _wind_normalize_table[] = {
|
const struct translation _wind_normalize_table[] = {
|
||||||
|
@@ -104,6 +104,7 @@ extern const size_t punycode_examples_size;
|
|||||||
|
|
||||||
examples_c.file.write(
|
examples_c.file.write(
|
||||||
'''
|
'''
|
||||||
|
#include <stdlib.h>
|
||||||
#include "punycode_examples.h"
|
#include "punycode_examples.h"
|
||||||
|
|
||||||
const struct punycode_example punycode_examples[] = {
|
const struct punycode_example punycode_examples[] = {
|
||||||
|
23
lib/wind/libwind-exports.def
Normal file
23
lib/wind/libwind-exports.def
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
EXPORTS
|
||||||
|
wind_stringprep
|
||||||
|
wind_profile
|
||||||
|
wind_punycode_label_toascii
|
||||||
|
wind_utf8ucs4
|
||||||
|
wind_utf8ucs4_length
|
||||||
|
wind_ucs4utf8
|
||||||
|
wind_ucs4utf8_length
|
||||||
|
wind_ucs2utf8
|
||||||
|
wind_utf8ucs2
|
||||||
|
wind_utf8ucs2_length
|
||||||
|
wind_ucs2utf8_length
|
||||||
|
wind_ucs2read
|
||||||
|
|
||||||
|
; testing
|
||||||
|
_wind_combining_class
|
||||||
|
_wind_stringprep_testbidi
|
||||||
|
_wind_stringprep_error
|
||||||
|
_wind_stringprep_prohibited
|
||||||
|
_wind_stringprep_map
|
||||||
|
_wind_stringprep_normalize
|
||||||
|
_wind_ldap_case_exact_attribute
|
||||||
|
_wind_ucs2read
|
@@ -45,7 +45,7 @@ struct test {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct test passing_cases[] = {
|
static struct test passing_cases[] = {
|
||||||
{0, {}},
|
{0, {0}},
|
||||||
{1, {0x0041}},
|
{1, {0x0041}},
|
||||||
{1, {0x05be}},
|
{1, {0x05be}},
|
||||||
};
|
};
|
||||||
|
@@ -50,7 +50,7 @@ struct testcase {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct testcase testcases[] = {
|
static const struct testcase testcases[] = {
|
||||||
{ { 0x20 }, 1, { }, 0 },
|
{ { 0x20 }, 1, { 0 }, 0 },
|
||||||
{ { 0x20, 0x61 }, 2, { 0x20, 0x61, 0x20}, 3 },
|
{ { 0x20, 0x61 }, 2, { 0x20, 0x61, 0x20}, 3 },
|
||||||
{ { 0x20, 0x61, 0x20 }, 3, { 0x20, 0x61, 0x20}, 3 },
|
{ { 0x20, 0x61, 0x20 }, 3, { 0x20, 0x61, 0x20}, 3 },
|
||||||
{ { 0x20, 0x61, 0x20, 0x61 }, 4, { 0x20, 0x61, 0x20, 0x20, 0x61, 0x20}, 6 }
|
{ { 0x20, 0x61, 0x20, 0x61 }, 4, { 0x20, 0x61, 0x20, 0x20, 0x61, 0x20}, 6 }
|
||||||
|
@@ -51,10 +51,10 @@ struct example {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static struct example cases[] = {
|
static struct example cases[] = {
|
||||||
{{}, 0, {}, 0},
|
{{0}, 0, {0}, 0},
|
||||||
{{0x0041}, 1, {0x0061}, 1},
|
{{0x0041}, 1, {0x0061}, 1},
|
||||||
{{0x0061}, 1, {0x0061}, 1},
|
{{0x0061}, 1, {0x0061}, 1},
|
||||||
{{0x00AD}, 1, {}, 0},
|
{{0x00AD}, 1, {0}, 0},
|
||||||
{{0x00DF}, 1, {0x0073, 0x0073}, 2}
|
{{0x00DF}, 1, {0x0073, 0x0073}, 2}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -95,3 +95,4 @@ main(void)
|
|||||||
failures += try(&cases[i]);
|
failures += try(&cases[i]);
|
||||||
return failures != 0;
|
return failures != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ struct testcase {
|
|||||||
WIND_RW_BOM,
|
WIND_RW_BOM,
|
||||||
2, "\xfe\xff",
|
2, "\xfe\xff",
|
||||||
0,
|
0,
|
||||||
0, { },
|
0, { 0 },
|
||||||
WIND_RW_BE
|
WIND_RW_BE
|
||||||
},
|
},
|
||||||
/* no input */
|
/* no input */
|
||||||
@@ -75,7 +75,7 @@ struct testcase {
|
|||||||
WIND_RW_BOM,
|
WIND_RW_BOM,
|
||||||
0, "",
|
0, "",
|
||||||
0,
|
0,
|
||||||
0, { },
|
0, { 0 },
|
||||||
WIND_RW_BOM
|
WIND_RW_BOM
|
||||||
},
|
},
|
||||||
/* BOM only */
|
/* BOM only */
|
||||||
@@ -83,7 +83,7 @@ struct testcase {
|
|||||||
WIND_RW_BOM,
|
WIND_RW_BOM,
|
||||||
2, "\xff\xfe",
|
2, "\xff\xfe",
|
||||||
0,
|
0,
|
||||||
0, { },
|
0, { 0 },
|
||||||
WIND_RW_LE
|
WIND_RW_LE
|
||||||
},
|
},
|
||||||
/* water + z */
|
/* water + z */
|
||||||
@@ -123,7 +123,7 @@ struct testcase {
|
|||||||
WIND_RW_BOM,
|
WIND_RW_BOM,
|
||||||
1, "\xfe",
|
1, "\xfe",
|
||||||
WIND_ERR_LENGTH_NOT_MOD2,
|
WIND_ERR_LENGTH_NOT_MOD2,
|
||||||
0, { },
|
0, { 0 },
|
||||||
WIND_RW_BOM
|
WIND_RW_BOM
|
||||||
},
|
},
|
||||||
/* error, missing BOM */
|
/* error, missing BOM */
|
||||||
@@ -131,7 +131,7 @@ struct testcase {
|
|||||||
WIND_RW_BOM,
|
WIND_RW_BOM,
|
||||||
2, "\x00\x20",
|
2, "\x00\x20",
|
||||||
WIND_ERR_NO_BOM,
|
WIND_ERR_NO_BOM,
|
||||||
0, { },
|
0, { 0 },
|
||||||
WIND_RW_BOM
|
WIND_RW_BOM
|
||||||
},
|
},
|
||||||
/* error, overrun */
|
/* error, overrun */
|
||||||
|
@@ -78,7 +78,7 @@ struct testcase {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static const struct testcase testcases[] = {
|
static const struct testcase testcases[] = {
|
||||||
{"", 0, {}},
|
{"", 0, {0}},
|
||||||
{"\x01", 1, {1}},
|
{"\x01", 1, {1}},
|
||||||
{"\x7F", 1, {0x7F}},
|
{"\x7F", 1, {0x7F}},
|
||||||
{"\x01\x7F", 2, {0x01, 0x7F}},
|
{"\x01\x7F", 2, {0x01, 0x7F}},
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <krb5-types.h>
|
#include <krb5-types.h>
|
||||||
|
#include <roken.h>
|
||||||
|
|
||||||
#include "wind.h"
|
#include "wind.h"
|
||||||
#include "wind_err.h"
|
#include "wind_err.h"
|
||||||
|
Reference in New Issue
Block a user