Compiles and links correctly.

This commit is contained in:
Martin Baulig
1998-06-14 14:45:57 +00:00
parent bde0d74282
commit 8f14d30d11
4 changed files with 5 additions and 51 deletions

View File

@@ -198,7 +198,7 @@ filename_expand (char *fullpath, char *filename)
/* Encase the string in quotes, escape all the backslashes and quotes /* Encase the string in quotes, escape all the backslashes and quotes
in string. */ in string. */
static char * static char *
clean_string (CONST char *s) clean_string (const char *s)
{ {
int i = 0; int i = 0;
char *p, *res; char *p, *res;
@@ -256,7 +256,7 @@ clean_string (CONST char *s)
/* A strdup immitation. */ /* A strdup immitation. */
static char * static char *
my_strdup (CONST char *s) my_strdup (const char *s)
{ {
char *new = malloc (strlen (s) + 1); char *new = malloc (strlen (s) + 1);
if (new) if (new)

View File

@@ -35,14 +35,6 @@ static char rcsid [] = "!Header: gnuserv.c,v 2.1 95/02/16 11:58:27 arup alpha !"
#include "gnuserv.h" #include "gnuserv.h"
#ifdef USE_LITOUT
#ifdef linux
#include <bsd/sgtty.h>
#else
#include <sgtty.h>
#endif
#endif
#ifdef AIX #ifdef AIX
#include <sys/select.h> #include <sys/select.h>
#endif #endif
@@ -852,14 +844,6 @@ main(argc,argv)
for(chan=3; chan < _NFILE; close(chan++)) /* close unwanted channels */ for(chan=3; chan < _NFILE; close(chan++)) /* close unwanted channels */
; ;
#ifdef USE_LITOUT
{
/* this is to allow ^D to pass to emacs */
int d = LLITOUT;
(void) ioctl(fileno(stdout), TIOCLBIS, &d);
}
#endif
#ifdef SYSV_IPC #ifdef SYSV_IPC
ipc_init(&msgp); /* get a msqid to listen on, and a message buffer */ ipc_init(&msgp); /* get a msqid to listen on, and a message buffer */
#endif /* SYSV_IPC */ #endif /* SYSV_IPC */

View File

@@ -41,7 +41,7 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
#define NO_SHORTNAMES #define NO_SHORTNAMES
/* gnuserv should not be compiled using SOCKS */ /* gnuserv should not be compiled using SOCKS */
#define DO_NOT_SOCKSIFY #define DO_NOT_SOCKSIFY
#include <../src/config.h> #include <glibtop/global.h>
#undef read #undef read
#undef write #undef write
#undef open #undef open
@@ -102,23 +102,6 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
#endif /* No communication method pre-defined */ #endif /* No communication method pre-defined */
#include <sys/types.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
/* /*
* If you are using SYSV_IPC, you might want to make the buffer size bigger * If you are using SYSV_IPC, you might want to make the buffer size bigger
* since it limits the size of requests and responses. Don't make it bigger * since it limits the size of requests and responses. Don't make it bigger
@@ -164,19 +147,6 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
#define HIDE_UNIX_SOCKET /* put the unix socket in a protected dir */ #define HIDE_UNIX_SOCKET /* put the unix socket in a protected dir */
#endif /* UNIX_DOMAIN_SOCKETS */ #endif /* UNIX_DOMAIN_SOCKETS */
/* On some platforms, we need to do the equivalent of "stty litout" to get
* characters like ^D to pass through to emacs. This problem has only
* been observed under emacs18; fsf19 and lemacs are probably okay without it.
*/
#ifndef DONT_USE_LITOUT
#if !defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS) && !defined(VMS)
#if !defined(MSDOS) && !defined(BSD4_1)
#define USE_LITOUT
#endif
#endif
#endif
#define HOSTNAMSZ 255 /* max size of a hostname */ #define HOSTNAMSZ 255 /* max size of a hostname */
#define REPLYSIZ 300 /* max size of reply from server to client */ #define REPLYSIZ 300 /* max size of reply from server to client */
#undef FALSE #undef FALSE
@@ -211,7 +181,7 @@ int make_connection (char *hostarg, int portarg, int *s);
void disconnect_from_ipc_server(); void disconnect_from_ipc_server();
#endif #endif
#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS) #if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
void send_string (int s, CONST char *msg); void send_string (int s, const char *msg);
void disconnect_from_server (int s, int echo); void disconnect_from_server (int s, int echo);
int read_line (int s, char *dest); int read_line (int s, char *dest);
#endif #endif

View File

@@ -196,7 +196,7 @@ void disconnect_from_ipc_server(s,msgp,echo)
*/ */
void send_string(s,msg) void send_string(s,msg)
int s; int s;
CONST char *msg; const char *msg;
{ {
#if 0 #if 0
if (send(s,msg,strlen(msg),0) < 0) { if (send(s,msg,strlen(msg),0) < 0) {