/* Interfaces to system-dependent kernel and library entries.
Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1999, 2000, 2001,
- 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+ 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
fcntl (fileno (tty_out->input), F_GETOWN, 0);
fcntl (fileno (tty_out->input), F_SETOWN, getpid ());
init_sigio (fileno (tty_out->input));
+#ifdef HAVE_GPM
+ if (term_gpm)
+ {
+ fcntl (gpm_fd, F_SETOWN, getpid ());
+ fcntl (gpm_fd, F_SETFL, fcntl (gpm_fd, F_GETFL, 0) | O_NONBLOCK);
+ init_sigio (gpm_fd);
+ }
+#endif /* HAVE_GPM */
}
#endif /* F_GETOWN */
#endif /* F_SETOWN_BUG */
/* We still don't have a fully qualified domain name.
Try to find one in the list of alternate names */
char **alias = hp->h_aliases;
- while (*alias && !index (*alias, '.'))
+ while (*alias
+ && (!index (*alias, '.')
+ || !strcmp (*alias, "localhost.localdomain")))
alias++;
if (*alias)
fqdn = *alias;
}
return ravail;
}
-#endif not WINDOWSNT
+#endif /* not WINDOWSNT */
/* Read keyboard input into the standard buffer,
waiting for at least one character. */