summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin Baulig <martin@home-of-linux.org>1998-07-13 23:27:10 +0000
committerMartin Baulig <martin@src.gnome.org>1998-07-13 23:27:10 +0000
commit345a657d2c5bbfae11b848016f012c199a6b328d (patch)
tree09de1593d93eb206bc2afbfc757aae705343cc77 /include
parentda7d7ff1163371de85e4735b94d1749fe12e0860 (diff)
downloadlibgtop-345a657d2c5bbfae11b848016f012c199a6b328d.tar.gz
New file.
1998-07-14 Martin Baulig <martin@home-of-linux.org> * src/daemon/slave.c: New file. * src/daemon/*.c: Done some more work on the daemon. * sysdeps/common/gnuslib.c: Removed IPC stuff. * include/glibtop/gnuserv.h: Removed IPC stuff. * include/glibtop/command.h (glibtop_response_unit): Added typedef for `struct _glibtop_response_unit'. * lib/Makefile.am: Using `$(top_srcdir)/features.def' instead of `$(top_builddir)/features.def'. * sysdeps/guile/Makefile.am: Using `$(top_srcdir)/features.def' instead of `$(top_builddir)/features.def'. * sysdeps/guile/names/Makefile.am: Dito. * sysdeps/stub/*.c: changed suffix of all functions from '_s' to '_r'; see also ChangeLog entry from Jun 6.
Diffstat (limited to 'include')
-rw-r--r--include/glibtop/command.h4
-rw-r--r--include/glibtop/gnuserv.h44
2 files changed, 8 insertions, 40 deletions
diff --git a/include/glibtop/command.h b/include/glibtop/command.h
index 1987e5d1..c76ed0ed 100644
--- a/include/glibtop/command.h
+++ b/include/glibtop/command.h
@@ -53,7 +53,9 @@ __BEGIN_DECLS
#define _GLIBTOP_PARAM_SIZE 16
typedef struct _glibtop_command glibtop_command;
+
typedef struct _glibtop_response glibtop_response;
+typedef union _glibtop_response_union glibtop_response_union;
struct _glibtop_command
{
@@ -73,7 +75,7 @@ struct _glibtop_response
{
off_t offset;
size_t size, data_size;
- union _glibtop_response_union u;
+ glibtop_response_union u;
};
#define glibtop_call(p1, p2, p3, p4) glibtop_call_r(glibtop_global_server, p1, p2, p3, p4)
diff --git a/include/glibtop/gnuserv.h b/include/glibtop/gnuserv.h
index 6d1df518..96099259 100644
--- a/include/glibtop/gnuserv.h
+++ b/include/glibtop/gnuserv.h
@@ -55,8 +55,7 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
*/
#define INTERNET_DOMAIN_SOCKETS
-#define UNIX_DOMAIN_SOCKETS
-// #define SYSV_IPC
+#define UNIX_DOMAIN_SOCKETS
/*
* Define additional authentication protocols to be used. These methods will
@@ -90,15 +89,13 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
* Pick a default communication scheme, if none was specified.
*/
-#if !defined(SYSV_IPC) && !defined(UNIX_DOMAIN_SOCKETS) && !defined(INTERNET_DOMAIN_SOCKETS)
+#if !defined(UNIX_DOMAIN_SOCKETS) && !defined(INTERNET_DOMAIN_SOCKETS)
-#ifdef HAVE_SYSVIPC
-#define SYSV_IPC /* SYSV systems use SYSV IPC by default */
-#endif /* HAVE_SYSVIPC */
+/* BSD systems use Unix Domain sockets by default */
#ifdef BSD
-#define UNIX_DOMAIN_SOCKETS /* BSD systems use Unix Domain sockets by default */
-#endif /* BSD */
+#define UNIX_DOMAIN_SOCKETS
+#endif
#endif /* No communication method pre-defined */
@@ -110,24 +107,6 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
* what you want.
*/
-# define GSERV_BUFSZ BUFSIZ
-
-
-#ifdef SYSV_IPC
-#include <sys/ipc.h>
-#include <sys/msg.h>
-
-#define send_string(s,str) \
- if (strlen(msgp->mtext) + strlen(str) < GSERV_BUFSZ) \
- strcat(msgp->mtext,str); \
- else \
- { \
- fprintf(stderr,"%s: not enough message buffer space\n",progname); \
- exit(1); \
- } \
-
-#endif /* SYSV_IPC */
-
#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
#include <sys/socket.h>
#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
@@ -154,9 +133,6 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
#undef TRUE
#define TRUE 1
-// extern char *optarg;
-// extern int optind;
-
/* The casts shut Sun's compiler up and are safe in the context these
are actually used. */
#define max2(x,y) (((int) (x) > (int) (y)) ? (x) : (y))
@@ -177,16 +153,6 @@ static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup a
/* function declarations */
extern int glibtop_make_connection __P((const char *, int, int *));
-#ifdef SYSV_IPC
-void disconnect_from_ipc_server();
-#endif
-
-#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
-// void send_string (int s, const char *msg);
-// void disconnect_from_server (int s, int echo);
-// int read_line (int s, char *dest);
-#endif
-
#ifdef INTERNET_DOMAIN_SOCKETS
extern long glibtop_internet_addr __P((const char *));
#endif