Rename fake-msi.c to makemsi.c.
It's now a sensible source flie containing a set of routines that do something coherently connected to each other, so it doesn't deserve that 'fake-' prefix that I used for the previous monolithic files full of tangled-together stuff. While I'm here, I've also made up nicer (i.e. more distinguishable) random magic numbers for the structure-type disambiguation.
This commit is contained in:
parent
7ca5ab5ef2
commit
a568db73a6
2 changed files with 14 additions and 6 deletions
|
@ -7,7 +7,7 @@ lib_LTLIBRARIES = libwinterop.so.la libmsi.so.la libpreload.la
|
|||
libwinterop_so_la_SOURCES = fake-winterop.c makecab.c memory.c \
|
||||
memory.h dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h
|
||||
|
||||
libmsi_so_la_SOURCES = fake-msi.c md5.c memory.c memory.h version.c \
|
||||
libmsi_so_la_SOURCES = makemsi.c md5.c memory.c memory.h version.c \
|
||||
dupstr.c dupstr.h subproc.c subproc.h uchars.c uchars.h
|
||||
|
||||
libpreload_la_SOURCES = preload.c
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <uchar.h>
|
||||
|
||||
#include <err.h>
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
@ -19,8 +17,18 @@
|
|||
#include "subproc.h"
|
||||
#include "uchars.h"
|
||||
|
||||
/*
|
||||
* The same routine MsiCloseHandle is used by our client to dispose of
|
||||
* three kinds of structure that _we_ think of as completely different
|
||||
* types. So we must ensure all three start with distinct magic number
|
||||
* fields, so as to know what kind we're being asked to close.
|
||||
*/
|
||||
typedef struct MsiTypePrefix {
|
||||
enum { MAIN, VIEW, RECORD } type;
|
||||
enum {
|
||||
MAIN = 0x2B7FB8B8,
|
||||
VIEW = 0x1570B0E3,
|
||||
RECORD = 0x62365065
|
||||
} type;
|
||||
} MsiTypePrefix;
|
||||
|
||||
typedef struct MsiMainCtx {
|
Loading…
Add table
Reference in a new issue