|
|
| version 1.12, 2025/03/24 20:13:34 | version 1.16, 2025/03/24 20:59:58 |
|---|---|
| Line 24 | Line 24 |
| * along with FreeM. If not, see <https://www.gnu.org/licenses/>. | * along with FreeM. If not, see <https://www.gnu.org/licenses/>. |
| * | * |
| * $Log$ | * $Log$ |
| * Revision 1.16 2025/03/24 20:59:58 snw | |
| * Try using DosCopy API instead of built-in cp function on OS/2 | |
| * | |
| * Revision 1.15 2025/03/24 20:58:05 snw | |
| * Try using DosCopy API instead of built-in cp function on OS/2 | |
| * | |
| * Revision 1.14 2025/03/24 20:57:06 snw | |
| * Try using DosCopy API instead of built-in cp function on OS/2 | |
| * | |
| * Revision 1.13 2025/03/24 20:15:09 snw | |
| * Set file permissions on freemd.exe on OS/2 in fmadm configure | |
| * | |
| * Revision 1.12 2025/03/24 20:13:34 snw | * Revision 1.12 2025/03/24 20:13:34 snw |
| * Set file permissions on freemd.exe on OS/2 in fmadm configure | * Set file permissions on freemd.exe on OS/2 in fmadm configure |
| * | * |
| Line 62 | Line 74 |
| #include "namespace.h" | #include "namespace.h" |
| #include "fs.h" | #include "fs.h" |
| #if defined(__OS2__) | |
| # include <os2.h> | |
| #endif | |
| #ifdef HAVE_LIBREADLINE | #ifdef HAVE_LIBREADLINE |
| # if defined(HAVE_READLINE_READLINE_H) | # if defined(HAVE_READLINE_READLINE_H) |
| # include <readline/readline.h> | # include <readline/readline.h> |
| Line 1160 void fm_configure (void) | Line 1176 void fm_configure (void) |
| unlink (dstfile); | unlink (dstfile); |
| fprintf (stderr, "fmadm: running on OS/2; will copy %s to %s\n", srcfile, dstfile); | fprintf (stderr, "fmadm: running on OS/2; will copy %s to %s\n", srcfile, dstfile); |
| chmod (dstfile, 0755); | |
| if (cp (dstfile, srcfile) != 0) { | if (DosCopy (srcfile, dstfile, 1) != 0) { |
| fprintf (stderr, "fmadm: fatal error copying %s to %s\n", srcfile, dstfile); | fprintf (stderr, "fmadm: fatal error copying %s to %s\n", srcfile, dstfile); |
| exit (1); | exit (1); |
| } | } |
| chmod (dstfile, 0755); | |
| } | } |
| #else | #else |
| fprintf (stderr, "fmadm: not running on OS/2\n"); | fprintf (stderr, "fmadm: not running on OS/2\n"); |
| Line 1177 void fm_configure (void) | Line 1194 void fm_configure (void) |
| printf ("This utility will create the initial configuration file for "); | printf ("This utility will create the initial configuration file for "); |
| printf ("FreeM environment '%s' in %s.\n\n", fma_environment, config_file); | printf ("FreeM environment '%s' in %s.\n\n", fma_environment, config_file); |
| /* check for existence of needed directories */ | /* check for existence of needed directories */ |
| if (stat (SYSCONFDIR, &etcstat) == -1) { | if (stat (SYSCONFDIR, &etcstat) == -1) { |
| fprintf (stderr, "fmadm: creating %s\n", SYSCONFDIR); | fprintf (stderr, "fmadm: creating %s\n", SYSCONFDIR); |