summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2021-08-14 14:46:56 -0400
committerpommicket <pommicket@gmail.com>2021-08-14 14:46:56 -0400
commit47385a21037a6d0304f415b2179f30671d0a78fb (patch)
treef4b202fad7a715320af2c89bb7b3b53159c27d48
parent0128e6811c92dd6f659fcc6dba849b9a4d87e4be (diff)
platform-specific dl name
-rw-r--r--main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/main.c b/main.c
index cf3ebdf..235c935 100644
--- a/main.c
+++ b/main.c
@@ -633,7 +633,16 @@ int main(int argc, char **argv) {
if (argv[i][0] == '-' && argv[i][1] != '-') ++i;
}
+ #if __unix__
+ fprintf(c_output, "#if __unix__\n");
+ #else
+ fprintf(c_output, "#if _WIN32\n");
+ #endif
fprintf(c_output, "#define DLSUB_REAL_DL_NAME \"%s\"\n", input_filename);
+ fprintf(c_output,
+ "#else\n"
+ "#error \"Please define DLSUB_REAL_DLNAME here.\"\n"
+ "#endif\n");
fprintf(c_output,
"static void dlsub_init(void);\n"