Revert "sys/time.h no longer needed on modern systems"
authorArt Cancro <ajc@uncensored.citadel.org>
Tue, 30 Sep 2014 13:23:26 +0000 (09:23 -0400)
committerArt Cancro <ajc@uncensored.citadel.org>
Tue, 30 Sep 2014 13:23:26 +0000 (09:23 -0400)
This reverts commit ebc64e2caae8740dd047e5317de2172eb3f44fc3.

citadel/modules/xmpp/xmpp_messages.c
citadel/modules/xmpp/xmpp_presence.c
citadel/modules/xmpp/xmpp_query_namespace.c
webcit/configure.ac
webcit/sysdep.c
webcit/webcit.h

index 7992d4de4946e3637c122fbd743aa47a813c2ebb..b2e2dadf4869736fa5bc15a409f77505842d7917 100644 (file)
@@ -1,15 +1,22 @@
 /*
  * Handle messages sent and received using XMPP (Jabber) protocol
  *
- * Copyright (c) 2007-2014 by Art Cancro
+ * Copyright (c) 2007-2010 by Art Cancro
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
+ * 
+ * 
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
+ *
+ * 
+ * 
+ * 
+ *
  */
 
 #include "sysdep.h"
@@ -118,11 +125,8 @@ void xmpp_send_message(char *message_to, char *message_body) {
        XMPP->message_to[0] = 0;
        time(&CCC->lastidle);
 }
-
-
 void xmpp_end_message(void *data, const char *supplied_el, const char **attr)
 {
-       safestrncpy(XMPP->message_to, ChrPtr(XMPP->Message.to), sizeof(XMPP->message_to));
        xmpp_send_message(XMPP->message_to, XMPP->message_body);
        XMPP->html_tag_level = 0;
 }
index 053994a3490b956172648cf5933055ec1b437c6b..9191f8f65561b413cc28c4b7e2938e360be6f105 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Handle XMPP presence exchanges
  *
- * Copyright (c) 2007-2014 by Art Cancro
+ * Copyright (c) 2007-2010 by Art Cancro
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -58,6 +58,7 @@
 #include "serv_xmpp.h"
 
 
+
 /* 
  * Indicate the presence of another user to the client
  * (used in several places)
 void xmpp_indicate_presence(char *presence_jid)
 {
        XPrint(HKEY("presence"),
-               XCLOSED,
-               XPROPERTY("from", presence_jid, strlen(presence_jid)),
-               XPROPERTY("to",  XMPP->client_jid, strlen(XMPP->client_jid)),
-               TYPE_ARGEND
-       );
+              XPROPERTY("from", presence_jid, strlen(presence_jid)),
+              XPROPERTY("to",  XMPP->client_jid, strlen(XMPP->client_jid)),
+              TYPE_ARGEND);
 }
 
 
+
 /*
  * Convenience function to determine whether any given session is 'visible' to any other given session,
  * and is capable of receiving instant messages from that session.
index 82e60647e9bd03d1cfbf16d735cda970ce3902b3..e7fcc0c8a98bba7a336e646ec46fc17a8005bbb2 100644 (file)
@@ -1,14 +1,21 @@
 /*
  * Handle <iq> <get> <query> type situations (namespace queries)
  *
- * Copyright (c) 2007-2014 by Art Cancro
+ * Copyright (c) 2007-2009 by Art Cancro
  *
- * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3.
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ *  This program is open source software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3.
+ *  
+ *  
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  
+ *  
+ *  
  */
 
 #include "sysdep.h"
  */
 void xmpp_roster_item(struct CitContext *cptr)
 {
+       struct CitContext *CCC=CC;
+
        XPrint(HKEY("item"), 0,
-               XCPROPERTY("subscription", "both"),
-               XPROPERTY("jid",  cptr->cs_inet_email, strlen(cptr->cs_inet_email)),
-               XPROPERTY("name", cptr->user.fullname, strlen(cptr->user.fullname)),
-               TYPE_ARGEND
-       );
+              XCPROPERTY("subscription", "both"),
+              XPROPERTY("jid",  CCC->cs_inet_email, strlen(CCC->cs_inet_email)),
+              XPROPERTY("name", cptr->user.fullname, strlen(cptr->user.fullname)),
+              TYPE_ARGEND);
 
        XPrint(HKEY("group"), XCLOSED,
               XCFGBODY(c_humannode),
index f17cc58195f42e728c41e9680846e0a04e80d863..1bdca0631d3788b7d87216ec10e77ca3e92e0500 100644 (file)
@@ -137,7 +137,7 @@ dnl AC_FUNC_VPRINTF
 AC_REPLACE_FUNCS(snprintf)
 AC_CHECK_HEADER(CUnit/CUnit.h, [AC_DEFINE(ENABLE_TESTS, [], [whether we should compile the test-suite])])
 
-AC_CHECK_HEADERS(fcntl.h limits.h unistd.h iconv.h xlocale.h)
+AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h iconv.h xlocale.h)
 
 dnl Checks for the zlib compression library.
 saved_CFLAGS="$CFLAGS"
index 44878c757ecd54e6f89b35098bdf115ef0016c10..fb34a4cef9d04b7c748f286412cb5d539e17108e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * WebCit "system dependent" code.
  *
- * Copyright (c) 1996-2014 by the citadel.org team
+ * Copyright (c) 1996-2012 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License, version 3.
 #include <sys/socket.h>
 #include <syslog.h>
 #include <sys/syslog.h>
-#include <time.h>
+
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# if HAVE_SYS_TIME_H
+#  include <sys/time.h>
+# else
+#  include <time.h>
+# endif
+#endif
+
 #include <limits.h>
 #include <sys/resource.h>
 #include <netinet/in.h>
index 19fe3722d921d0c46930b12afd3f8053ef73a828..6a8d034000d2f31449ac5c5d14e527c8a61f4624 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1987-2014 by the citadel.org team
+ * Copyright (c) 1987-2013 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version 3.
@@ -25,6 +25,9 @@
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <sys/socket.h>
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
 #include <sys/stat.h>
 #ifdef HAVE_LIMITS_H
 #include <limits.h>