[1850] in Moira
Fix to stella for Windows build
daemon@ATHENA.MIT.EDU (Danilo D Almeida)
Tue Aug 21 12:32:30 2001
Date: Tue, 21 Aug 2001 12:32:28 -0400 (EDT)
Message-Id: <200108211632.MAA142231@fides.mit.edu>
From: Danilo D Almeida <dalmeida@MIT.EDU>
To: moiradev@mit.edu
This fixes a header and type compatibility problem with Windows that
broke last night's build. I moved the Unix #includes so as to keep
all the socket stuff together.
Note: We actually don't pull in winsock explicitly because moira.h
already includes windows.h, which pulls in winsock.h. (Not explicitly
pulling in winsock.h is the style that the other clients seem to use.)
I also took out an unused variable.
- Danilo
--------------
Index: stella.c
===================================================================
RCS file: /afs/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/stella/stella.c,v
retrieving revision 1.12
diff -u -r1.12 stella.c
--- stella.c 2001/08/20 23:23:52 1.12
+++ stella.c 2001/08/21 16:19:31
@@ -10,12 +10,6 @@
* <mit-copyright.h>.
*/
-#include <sys/types.h>
-#include <sys/socket.h>
-
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
#include <mit-copyright.h>
#include <moira.h>
#include <moira_site.h>
@@ -27,6 +21,16 @@
#include <stdlib.h>
#include <string.h>
+#ifdef _WIN32
+typedef unsigned long in_addr_t;
+#else
+#include <sys/types.h>
+#include <sys/socket.h>
+
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
RCSID("$Header: /afs/all/athena.mit.edu/astaff/project/moiradev/repository/moira/clients/stella/stella.c,v 1.12 2001/08/20 23:23:52 zacheiss Exp $");
struct owner_type {
@@ -854,7 +858,6 @@
void show_host_info_unformatted(char **argv)
{
- char tbuf[256];
char *args[3];
struct mqelem *elem = NULL;
int stat;