diff --git a/src/emx/src/emxbind/emxbind.c b/src/emx/src/emxbind/emxbind.c
index f37c434e..fdf53054 100755
a
|
b
|
static void get_args (void)
|
476 | 476 | _defext (def_fname, "def"); |
477 | 477 | read_def_file (); |
478 | 478 | } |
479 | | file_name (out_fname, (dll_flag ? "dll" : "exe"), |
| 479 | file_name (out_fname, (opt_o != NULL && _getext(opt_o)) ? NULL : |
| 480 | (dll_flag ? "dll" : "exe"), |
480 | 481 | (opt_o != NULL ? opt_o : inp_fname)); |
481 | 482 | if (stricmp (inp_fname, out_fname) == 0) |
482 | 483 | error ("The input and output files have the same name"); |
diff --git a/src/emx/src/ld/ld.c b/src/emx/src/ld/ld.c
index c6fe287c..93663ed3 100755
a
|
b
|
static struct option longopts[] =
|
1078 | 1078 | {"Zwin32", 0, 0, 140}, /* Create GUI, CUI Win32 */ |
1079 | 1079 | {"Zrsx32", 0, 0, 141}, /* Create Win32/DOS win32 base */ |
1080 | 1080 | {"Zemx32", 0, 0, 142}, /* Create Win32/DOS emx base */ |
| 1081 | {"Zdll", 0, 0, 143}, /* Create .dll file */ |
1081 | 1082 | {"S", 0, 0, 'S'}, |
1082 | 1083 | {"T", 1, 0, 'T'}, |
1083 | 1084 | {"Ttext", 1, 0, 'T'}, |
… |
… |
decode_command (argc, argv)
|
1278 | 1279 | rsxnt_linked = RSXNT_EMX; |
1279 | 1280 | break; |
1280 | 1281 | |
| 1282 | case 143: /* -Zdll */ |
| 1283 | dll_flag = 1; |
| 1284 | break; |
| 1285 | |
1281 | 1286 | case 'R': |
1282 | 1287 | reloc_flag = 1; |
1283 | 1288 | break; |
… |
… |
void check_exe (void)
|
3847 | 3852 | else |
3848 | 3853 | { |
3849 | 3854 | ext = _getext2 (output_filename); |
3850 | | if (stricmp (ext, ".dll") == 0) |
| 3855 | if (dll_flag || stricmp (ext, ".dll") == 0) |
3851 | 3856 | { |
| 3857 | if (!*ext) |
| 3858 | output_filename = concat (output_filename, ".dll", NULL); |
| 3859 | |
3852 | 3860 | reloc_flag = 1; dll_flag = 1; |
3853 | 3861 | } |
3854 | | else if (stricmp (ext, ".exe") != 0) |
3855 | | { |
3856 | | exe_filename = NULL; |
3857 | | return; |
3858 | | } |
| 3862 | else if (!*ext) |
| 3863 | output_filename = concat (output_filename, ".exe", NULL); |
3859 | 3864 | exe_filename = output_filename; |
3860 | 3865 | } |
3861 | 3866 | |