--- freem/src/init.c 2025/03/24 04:05:36 1.7 +++ freem/src/init.c 2025/03/24 04:44:55 1.8 @@ -1,5 +1,5 @@ /* - * $Id: init.c,v 1.7 2025/03/24 04:05:36 snw Exp $ + * $Id: init.c,v 1.8 2025/03/24 04:44:55 snw Exp $ * FreeM initialization * * @@ -24,6 +24,9 @@ * along with FreeM. If not, see . * * $Log: init.c,v $ + * Revision 1.8 2025/03/24 04:44:55 snw + * Don't call ttyname on OS/2 + * * Revision 1.7 2025/03/24 04:05:36 snw * Replace crlf with frm_crlf to avoid symbol conflict with readline on OS/2 * @@ -556,7 +559,7 @@ void init_io (void) set_io (MUMPS); /* set i/o parameters */ -#if !defined(__AMIGA) +#if !defined(__AMIGA) && !defined(__OS2__) if (ttyname (HOME)) { /* for $IO of HOME */ strcpy (dev[HOME], ttyname (HOME)); dev[HOME][strlen (dev[HOME])] = EOL; @@ -565,7 +568,13 @@ void init_io (void) dev[HOME][0] = EOL; /* ...we are in a pipe */ } #else +#if defined(__AMIGA) strcpy (dev[HOME], "CONSOLE:"); +#else +#if defined(__OS2__) + strcpy (dev[HOME], "CON:"); +#endif +#endif #endif /* init function keys */