diff options
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | fake-msi.c | 2 | ||||
-rw-r--r-- | fake-winterop.c | 2 | ||||
-rw-r--r-- | md5.c | 2 | ||||
-rw-r--r-- | uchars.c (renamed from fake-lib.c) | 13 | ||||
-rw-r--r-- | uchars.h (renamed from fake-lib.h) | 3 | ||||
-rw-r--r-- | version.c | 2 |
8 files changed, 13 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am index 806366a..b23c901 100644 --- a/Makefile.am +++ b/Makefile.am | |||
@@ -4,11 +4,11 @@ ACLOCAL_AMFLAGS = -I m4 | |||
4 | 4 | ||
5 | lib_LTLIBRARIES = libwinterop.so.la libmsi.so.la libpreload.la | 5 | lib_LTLIBRARIES = libwinterop.so.la libmsi.so.la libpreload.la |
6 | 6 | ||
7 | libwinterop_so_la_SOURCES = fake-winterop.c fake-lib.c fake-lib.h \ | 7 | libwinterop_so_la_SOURCES = fake-winterop.c memory.c memory.h \ |
8 | memory.c memory.h dupstr.c dupstr.h subproc.c subproc.h | 8 | dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h |
9 | 9 | ||
10 | libmsi_so_la_SOURCES = fake-msi.c fake-lib.c fake-lib.h md5.c \ | 10 | libmsi_so_la_SOURCES = fake-msi.c md5.c memory.c memory.h version.c \ |
11 | memory.c memory.h version.c dupstr.c dupstr.h subproc.c subproc.h | 11 | dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h |
12 | 12 | ||
13 | libpreload_la_SOURCES = preload.c | 13 | libpreload_la_SOURCES = preload.c |
14 | libpreload_la_LDFLAGS = -ldl | 14 | libpreload_la_LDFLAGS = -ldl |
diff --git a/configure.ac b/configure.ac index a5986be..6b657b6 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,7 +1,7 @@ | |||
1 | # autoconf input for Wix Linux shim. | 1 | # autoconf input for Wix Linux shim. |
2 | 2 | ||
3 | AC_INIT([wix-linux-shim], [NOVERSION], [anakin@pobox.com]) | 3 | AC_INIT([wix-linux-shim], [NOVERSION], [anakin@pobox.com]) |
4 | AC_CONFIG_SRCDIR([fake-lib.h]) | 4 | AC_CONFIG_SRCDIR([makecab.py]) |
5 | AC_CONFIG_MACRO_DIRS([m4]) | 5 | AC_CONFIG_MACRO_DIRS([m4]) |
6 | 6 | ||
7 | AM_INIT_AUTOMAKE(foreign) | 7 | AM_INIT_AUTOMAKE(foreign) |
@@ -17,7 +17,7 @@ | |||
17 | #include "memory.h" | 17 | #include "memory.h" |
18 | #include "dupstr.h" | 18 | #include "dupstr.h" |
19 | #include "subproc.h" | 19 | #include "subproc.h" |
20 | #include "fake-lib.h" | 20 | #include "uchars.h" |
21 | 21 | ||
22 | typedef struct MsiTypePrefix { | 22 | typedef struct MsiTypePrefix { |
23 | enum { MAIN, VIEW, RECORD } type; | 23 | enum { MAIN, VIEW, RECORD } type; |
diff --git a/fake-winterop.c b/fake-winterop.c index 1b439fe..d238784 100644 --- a/fake-winterop.c +++ b/fake-winterop.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include "memory.h" | 14 | #include "memory.h" |
15 | #include "dupstr.h" | 15 | #include "dupstr.h" |
16 | #include "subproc.h" | 16 | #include "subproc.h" |
17 | #include "fake-lib.h" | 17 | #include "uchars.h" |
18 | 18 | ||
19 | uint32_t HashPublicKeyInfo(void *pCertContext, | 19 | uint32_t HashPublicKeyInfo(void *pCertContext, |
20 | void *rgbSubjectKeyIdentifier, | 20 | void *rgbSubjectKeyIdentifier, |
@@ -20,7 +20,7 @@ | |||
20 | #include <err.h> | 20 | #include <err.h> |
21 | 21 | ||
22 | #include "memory.h" | 22 | #include "memory.h" |
23 | #include "fake-lib.h" | 23 | #include "uchars.h" |
24 | 24 | ||
25 | /* ---------------------------------------------------------------------- | 25 | /* ---------------------------------------------------------------------- |
26 | * Core MD5 algorithm: processes 16-word blocks into a message digest. | 26 | * Core MD5 algorithm: processes 16-word blocks into a message digest. |
@@ -1,21 +1,12 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <stdlib.h> | ||
3 | #include <stdint.h> | ||
4 | #include <stdbool.h> | ||
5 | #include <stdarg.h> | ||
6 | #include <string.h> | ||
7 | #include <uchar.h> | ||
8 | #include <err.h> | ||
9 | |||
10 | #include "memory.h" | 1 | #include "memory.h" |
11 | #include "fake-lib.h" | 2 | #include "uchars.h" |
12 | 3 | ||
13 | char *ascii(const char16_t *wstr, bool translate_slashes) | 4 | char *ascii(const char16_t *wstr, bool translate_slashes) |
14 | { | 5 | { |
15 | size_t len = 0; | 6 | size_t len = 0; |
16 | for (const char16_t *wp = wstr; *wp; wp++) | 7 | for (const char16_t *wp = wstr; *wp; wp++) |
17 | len++; | 8 | len++; |
18 | char *ret = malloc(len + 1); | 9 | char *ret = snewn(len + 1, char); |
19 | char *p = ret; | 10 | char *p = ret; |
20 | for (const char16_t *wp = wstr; *wp; wp++) | 11 | for (const char16_t *wp = wstr; *wp; wp++) |
21 | *p++ = (*wp == '\\' && translate_slashes ? '/' : | 12 | *p++ = (*wp == '\\' && translate_slashes ? '/' : |
@@ -1,5 +1,6 @@ | |||
1 | #include <uchar.h> | 1 | #include <uchar.h> |
2 | #include <stdlib.h> | 2 | #include <stdint.h> |
3 | #include <stdbool.h> | ||
3 | 4 | ||
4 | char *ascii(const char16_t *wstr, bool translate_slashes); | 5 | char *ascii(const char16_t *wstr, bool translate_slashes); |
5 | void c16cpy(char16_t *out, uint32_t *outsize, char *s); | 6 | void c16cpy(char16_t *out, uint32_t *outsize, char *s); |
@@ -10,7 +10,7 @@ | |||
10 | #include <err.h> | 10 | #include <err.h> |
11 | 11 | ||
12 | #include "memory.h" | 12 | #include "memory.h" |
13 | #include "fake-lib.h" | 13 | #include "uchars.h" |
14 | 14 | ||
15 | uint32_t MsiGetFileVersionW(const char16_t *filename, | 15 | uint32_t MsiGetFileVersionW(const char16_t *filename, |
16 | char16_t *version, uint32_t *version_size, | 16 | char16_t *version, uint32_t *version_size, |