diff -c termcap/termcap.c d:termcap/termcap.c
*** termcap/termcap.c	Thu Apr 15 18:56:34 1993
--- d:termcap/termcap.c	Wed Aug 31 01:46:46 1994
***************
*** 15,20 ****
--- 15,22 ----
  along with this program; see the file COPYING.  If not, write to
  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
+ /* Modified for emx by Eberhard Mattes, Aug 1994 */
+ 
  /* Emacs config.h may rename various library functions such as malloc.  */
  #ifdef HAVE_CONFIG_H
  #include "config.h"
***************
*** 330,335 ****
--- 332,343 ----
  static int compare_contin ();
  static int name_match ();
  
+ #ifdef EMX
+ 
+ #define valid_filename_p(fn) \
+ 	(*(fn) == '/' || *(fn) == '\\' || _fngetdrive (fn))
+ 
+ #else /* not EMX */
  #ifdef VMS
  
  #include <rmsdef.h>
***************
*** 360,365 ****
--- 368,374 ----
  #define valid_filename_p(fn) (*(fn) == '/')
  
  #endif /* !VMS */
+ #endif /* not EMX */
  
  /* Find the termcap entry data for terminal type NAME
     and store it in the block that BP points to.
***************
*** 419,429 ****
--- 428,442 ----
      }
  
    if (!termcap_name || !filep)
+ #ifdef EMX
+     termcap_name = "/emx/etc/termcap.dat";
+ #else /* not EMX */
  #ifdef VMS
      termcap_name = "emacs_library:[etc]termcap.dat";
  #else
      termcap_name = "/etc/termcap";
  #endif
+ #endif /* not EMX */
  
    /* Here we know we must search a file and termcap_name has its name.  */
  
diff -c termcap/termcap.h d:termcap/termcap.h
*** termcap/termcap.h	Thu Dec 03 19:44:26 1992
--- d:termcap/termcap.h	Wed Aug 31 02:03:32 1994
***************
*** 15,23 ****
--- 15,29 ----
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  
+ /* Modified for emx by Eberhard Mattes, Aug 1994 */
+ 
  #ifndef _TERMCAP_H
  #define _TERMCAP_H 1
  
+ #if defined (__cplusplus)
+ extern "C" {
+ #endif
+ 
  #if __STDC__
  
  extern int tgetent (char *buffer, const char *termtype);
***************
*** 58,62 ****
--- 64,72 ----
  extern char *tgoto ();
  
  #endif /* not __STDC__ */
+ 
+ #if defined (__cplusplus)
+ }
+ #endif
  
  #endif /* not _TERMCAP_H */
