comparison src/s/usg5-4.h @ 5337:906ccc7dcd70

Change to qxesprintf(), qxestrcpy(), s/hpux11.h, s/usg5-4.h 2011-01-14 Aidan Kehoe <kehoea@parhasard.net> * s/hpux11.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF): * s/usg5-4.h (PTY_TTY_NAME_SPRINTF, PTY_NAME_SPRINTF): Replace sprintf() with qxesprintf(), strcpy with qxestrpy(), hopefully fixing some platform-specific C++ builds.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 14 Jan 2011 23:23:30 +0000
parents aa5ed11f473b
children 9dd4559b9e9a
comparison
equal deleted inserted replaced
5336:287499ff4c5f 5337:906ccc7dcd70
122 #include <sys/termios.h> 122 #include <sys/termios.h>
123 #endif 123 #endif
124 124
125 /* This sets the name of the master side of the PTY. */ 125 /* This sets the name of the master side of the PTY. */
126 126
127 #define PTY_NAME_SPRINTF strcpy (pty_name, "/dev/ptmx"); 127 #define PTY_NAME_SPRINTF qxestrcpy (pty_name, "/dev/ptmx");
128 128
129 /* This sets the name of the slave side of the PTY. On SysVr4, 129 /* This sets the name of the slave side of the PTY. On SysVr4,
130 grantpt(3) forks a subprocess, so keep sigchld_handler() from 130 grantpt(3) forks a subprocess, so keep sigchld_handler() from
131 intercepting that death. If any child but grantpt's should die 131 intercepting that death. If any child but grantpt's should die
132 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */ 132 within, it should be caught after EMACS_UNBLOCK_SIGNAL. */
148 EMACS_UNBLOCK_SIGCHLD; \ 148 EMACS_UNBLOCK_SIGCHLD; \
149 if (unlockpt (fd) == -1) \ 149 if (unlockpt (fd) == -1) \
150 { close (fd); return -1; } \ 150 { close (fd); return -1; } \
151 if (!(ptyname = ptsname (fd))) \ 151 if (!(ptyname = ptsname (fd))) \
152 { close (fd); return -1; } \ 152 { close (fd); return -1; } \
153 strncpy (pty_name, ptyname, sizeof (pty_name)); \ 153 qxestrncpy (pty_name, ptyname, sizeof (pty_name)); \
154 pty_name[sizeof (pty_name) - 1] = 0; \ 154 pty_name[sizeof (pty_name) - 1] = 0; \
155 } 155 }
156 156
157 /* Push various streams modules onto a PTY channel. */ 157 /* Push various streams modules onto a PTY channel. */
158 158