projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5aef179
)
Meow meow! Applied patches sent by LadySerenaKitty for improved FreeBSD compatibility.
author
Art Cancro
<ajc@citadel.org>
Wed, 20 Apr 2022 00:03:36 +0000
(20:03 -0400)
committer
Art Cancro
<ajc@citadel.org>
Wed, 20 Apr 2022 00:03:36 +0000
(20:03 -0400)
13 files changed:
citadel/clientsocket.c
patch
|
blob
|
history
citadel/domain.c
patch
|
blob
|
history
citadel/missing
[changed mode: 0644->0755]
patch
|
blob
|
history
citadel/modules/nntp/serv_nntp.c
patch
|
blob
|
history
citadel/scripts/mk_module_init.sh
patch
|
blob
|
history
citadel/scripts/mk_svn_revision.sh
patch
|
blob
|
history
libcitadel/conftools/libtool.m4
patch
|
blob
|
history
textclient/citadel.rc
patch
|
blob
|
history
textclient/commands.c
patch
|
blob
|
history
textclient/configure
patch
|
blob
|
history
webcit/fmt_date.c
patch
|
blob
|
history
webcit/http_datestring.c
patch
|
blob
|
history
webcit/scripts/get_ical_data.sh
patch
|
blob
|
history
diff --git
a/citadel/clientsocket.c
b/citadel/clientsocket.c
index 07ec4c3823195662ddb39e8ba837f1157bc4dc22..a88c614d91240409266e9d461b69f58450cf17f6 100644
(file)
--- a/
citadel/clientsocket.c
+++ b/
citadel/clientsocket.c
@@
-13,6
+13,9
@@
#include <unistd.h>
#include <netdb.h>
#include <stdio.h>
#include <unistd.h>
#include <netdb.h>
#include <stdio.h>
+#ifdef __FreeBSD__
+#include <sys/socket.h>
+#endif
#include <libcitadel.h>
#include "ctdl_module.h"
#include "clientsocket.h"
#include <libcitadel.h>
#include "ctdl_module.h"
#include "clientsocket.h"
diff --git
a/citadel/domain.c
b/citadel/domain.c
index 18764725e093ae357795411e0915d35364a88107..79461f55a1cd6cc22b1893d284fe67a7e26c65c4 100644
(file)
--- a/
citadel/domain.c
+++ b/
citadel/domain.c
@@
-20,6
+20,9
@@
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h>
#endif
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h>
#endif
+#ifdef __FreeBSD__
+#include <netinet/in.h>
+#endif
#include <resolv.h>
#endif
#include <libcitadel.h>
#include <resolv.h>
#endif
#include <libcitadel.h>
diff --git
a/citadel/missing
b/citadel/missing
old mode 100644
(file)
new mode 100755
(executable)
diff --git
a/citadel/modules/nntp/serv_nntp.c
b/citadel/modules/nntp/serv_nntp.c
index c629fcc41856a0a839bbec8713666df7afb95dee..135d773928c9de33960fff14e90be599cbbbc2fd 100644
(file)
--- a/
citadel/modules/nntp/serv_nntp.c
+++ b/
citadel/modules/nntp/serv_nntp.c
@@
-51,7
+51,9
@@
#include "ctdl_module.h"
#include "serv_nntp.h"
#include "ctdl_module.h"
#include "serv_nntp.h"
+#ifndef __FreeBSD__
extern long timezone;
extern long timezone;
+#endif
//
// Tests whether the supplied string is a valid newsgroup name
//
// Tests whether the supplied string is a valid newsgroup name
@@
-428,7
+430,11
@@
void nntp_newgroups(const char *cmd) {
thetime = mktime(&tm);
if (!strcasecmp(stringy_gmt, "GMT")) {
tzset();
thetime = mktime(&tm);
if (!strcasecmp(stringy_gmt, "GMT")) {
tzset();
+#ifdef __FreeBSD__
+ thetime += &tm.tm_gmtoff;
+#else
thetime += timezone;
thetime += timezone;
+#endif
}
}
diff --git
a/citadel/scripts/mk_module_init.sh
b/citadel/scripts/mk_module_init.sh
index 3d684df2b54384390ff1c5ef1c5cfd65fede31be..cabae3ccb071b39347f1e73c6e936996e54cdb9e 100755
(executable)
--- a/
citadel/scripts/mk_module_init.sh
+++ b/
citadel/scripts/mk_module_init.sh
@@
-4,7
+4,7
@@
#
ECHO=/usr/bin/printf
#
ECHO=/usr/bin/printf
-SED=/bin/sed
+SED=/
usr/
bin/sed
#MINUS_e=X`$ECHO -n -e`
#if [ $MINUS_e != "X" ] ; then
#MINUS_e=X`$ECHO -n -e`
#if [ $MINUS_e != "X" ] ; then
diff --git
a/citadel/scripts/mk_svn_revision.sh
b/citadel/scripts/mk_svn_revision.sh
index 144ffa4ab9d7e5c6cf2a02bc33b3d495324fa800..9a68d27bdcad44fe08ab4c39e8c421e9341af427 100755
(executable)
--- a/
citadel/scripts/mk_svn_revision.sh
+++ b/
citadel/scripts/mk_svn_revision.sh
@@
-25,7
+25,7
@@
if test -d $SRC_DIR/.svn ; then
else
if test -d $SRC_DIR/../.git ; then
echo "have Git repository."
else
if test -d $SRC_DIR/../.git ; then
echo "have Git repository."
- BUILD=`/usr/bin/git log -1 --pretty=%h . `
+ BUILD=`/usr/bin/
env
git log -1 --pretty=%h . `
echo "This code base git-revision: $BUILD"
CAN_BUILD_SVN_REVISION="yes"
else
echo "This code base git-revision: $BUILD"
CAN_BUILD_SVN_REVISION="yes"
else
diff --git
a/libcitadel/conftools/libtool.m4
b/libcitadel/conftools/libtool.m4
index 0f53cb592ec026467985d5f69d6eff1be58d1e91..8d379e879c3490f29c7740e339a402e45ea0653a 100755
(executable)
--- a/
libcitadel/conftools/libtool.m4
+++ b/
libcitadel/conftools/libtool.m4
@@
-1387,7
+1387,7
@@
dgux*)
shlibpath_var=LD_LIBRARY_PATH
;;
shlibpath_var=LD_LIBRARY_PATH
;;
-freebsd1*)
+freebsd1
.
*)
dynamic_linker=no
;;
dynamic_linker=no
;;
@@
-1428,7
+1428,7
@@
freebsd* | dragonfly*)
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
esac
shlibpath_var=LD_LIBRARY_PATH
case $host_os in
- freebsd2*)
+ freebsd2
.
*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
shlibpath_overrides_runpath=yes
;;
freebsd3.[[01]]* | freebsdelf3.[[01]]*)
@@
-5866,7
+5866,7
@@
_LT_EOF
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
;;
- freebsd1*)
+ freebsd1
.
*)
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
_LT_AC_TAGVAR(ld_shlibs, $1)=no
;;
@@
-5882,7
+5882,7
@@
_LT_EOF
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
;;
# Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
+ freebsd2
.
*)
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
_LT_AC_TAGVAR(hardcode_direct, $1)=yes
_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
diff --git
a/textclient/citadel.rc
b/textclient/citadel.rc
index 7ad566d83ef48832f2261f9bfdab7d9802d1c82b..7f184dbcf4319fbc7309917d491a4443bc317006 100644
(file)
--- a/
textclient/citadel.rc
+++ b/
textclient/citadel.rc
@@
-4,8
+4,9
@@
# The standard client looks for this file in:
# 1. $HOME/.citadelrc
# 2. <compiled CTDLDIR>/citadel.rc
# The standard client looks for this file in:
# 1. $HOME/.citadelrc
# 2. <compiled CTDLDIR>/citadel.rc
-# 3. /etc/citadel.rc
-# 4. <current directory>/citadel.rc
+# 3. /usr/local/etc/citadel.rc
+# 4. /etc/citadel.rc
+# 5. <current directory>/citadel.rc
# Set ENCRYPT to yes to force SSL/TLS encryption when connecting to a
# Citadel server, even if the server is on the same machine as the
# Set ENCRYPT to yes to force SSL/TLS encryption when connecting to a
# Citadel server, even if the server is on the same machine as the
diff --git
a/textclient/commands.c
b/textclient/commands.c
index 81fef751a9bc017b1b6c4c499292f6df9ebe6e7d..c2f9f77bd0ce882f4bae8a2eebafbcad0a318de6 100644
(file)
--- a/
textclient/commands.c
+++ b/
textclient/commands.c
@@
-939,6
+939,9
@@
void load_command_set(void)
if (ccfile == NULL) {
ccfile = fopen(file_citadel_rc, "r");
}
if (ccfile == NULL) {
ccfile = fopen(file_citadel_rc, "r");
}
+ if (ccfile == NULL) {
+ ccfile = fopen("/usr/local/etc/citadel.rc", "r");
+ }
if (ccfile == NULL) {
ccfile = fopen("/etc/citadel.rc", "r");
}
if (ccfile == NULL) {
ccfile = fopen("/etc/citadel.rc", "r");
}
diff --git
a/textclient/configure
b/textclient/configure
index f43c18f3d614df4a6a2983b817e5f9d49b18ddd2..d87d078c5654dde417268972db4244dc8530fa9e 100755
(executable)
--- a/
textclient/configure
+++ b/
textclient/configure
@@
-87,14
+87,14
@@
int main(int argc, char **argv) {
echo SSL: $SSL
[ "$SSL" = "yes" ] && {
CFLAGS=${CFLAGS}' -DHAVE_OPENSSL'
echo SSL: $SSL
[ "$SSL" = "yes" ] && {
CFLAGS=${CFLAGS}' -DHAVE_OPENSSL'
- LDFLAGS=${LDFLAGS}' -lssl -lcrypto'
+ LDFLAGS=${LDFLAGS}' -lssl -lcrypto
-lz
'
}
# Output the config.mk
(
echo "CFLAGS := ${CFLAGS}"
}
# Output the config.mk
(
echo "CFLAGS := ${CFLAGS}"
- echo "LDFLAGS := ${LDFLAGS}"
+ echo "LDFLAGS := ${LDFLAGS}
-liconv
"
echo "PREFIX := ${PREFIX}"
echo "BINDIR := ${BINDIR}"
echo "CTDLDIR := ${CTDLDIR}"
echo "PREFIX := ${PREFIX}"
echo "BINDIR := ${BINDIR}"
echo "CTDLDIR := ${CTDLDIR}"
diff --git
a/webcit/fmt_date.c
b/webcit/fmt_date.c
index 62caf410c83524ef23243bb39719cdad58cc815e..a14c3d5c3026ca60c1a0263689273572bd4a52d7 100644
(file)
--- a/
webcit/fmt_date.c
+++ b/
webcit/fmt_date.c
@@
-280,7
+280,11
@@
time_t httpdate_to_timestamp(StrBuf *buf)
* some systems.
*/
tzset();
* some systems.
*/
tzset();
+#ifdef __FreeBSD__
+ tt.tm_sec = tt.tm_sec - tt.tm_gmtoff;
+#else
tt.tm_sec = tt.tm_sec - (int)timezone;
tt.tm_sec = tt.tm_sec - (int)timezone;
+#endif
t = mktime(&tt);
return t;
}
t = mktime(&tt);
return t;
}
diff --git
a/webcit/http_datestring.c
b/webcit/http_datestring.c
index 33158dca92e20d1a9f48d54373a21bb597c4b48e..d1f6634e3df5c1b16f8d4266ac305d583c8e2f36 100644
(file)
--- a/
webcit/http_datestring.c
+++ b/
webcit/http_datestring.c
@@
-1,5
+1,9
@@
#include "webcit.h"
#include "webcit.h"
+#ifdef __FreeBSD__
+/** I like to believe there is a better way to do this. */
+#define HAVE_STRUCT_TM_TM_GMTOFF
+#endif
/** HTTP Months - do not translate - these are not for human consumption */
static char *httpdate_months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
/** HTTP Months - do not translate - these are not for human consumption */
static char *httpdate_months[] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
diff --git
a/webcit/scripts/get_ical_data.sh
b/webcit/scripts/get_ical_data.sh
index 0bce6d866ec0ec85eee769fd0167052c8497c808..07e6e3f3f139349a8c94323f15af146ed48646ae 100755
(executable)
--- a/
webcit/scripts/get_ical_data.sh
+++ b/
webcit/scripts/get_ical_data.sh
@@
-6,6
+6,8
@@
echo Running $0
ICAL=/usr/local/ctdlsupport/include/libical/ical.h
if test -f /usr/include/libical/ical.h; then
ICAL=/usr/include/libical/ical.h
ICAL=/usr/local/ctdlsupport/include/libical/ical.h
if test -f /usr/include/libical/ical.h; then
ICAL=/usr/include/libical/ical.h
+elif test -f /usr/local/include/libical/ical.h; then
+ ICAL=/usr/local/include/libical/ical.h
fi
if test ! -f ${ICAL}; then
fi
if test ! -f ${ICAL}; then
@@
-64,21
+66,21
@@
ICALTYPES="icalproperty_kind"\
for icaltype in $ICALTYPES; do
cat ./scripts/get_ical_data__template.sed | \
for icaltype in $ICALTYPES; do
cat ./scripts/get_ical_data__template.sed | \
- sed -e "s;__ICALTYPE__;$icaltype;g" > \
+
g
sed -e "s;__ICALTYPE__;$icaltype;g" > \
/tmp/get_ical_data.sed
printf "Ical_${icaltype} ${icaltype}_map[] = {\n"
cat ${ICAL} |\
/tmp/get_ical_data.sed
printf "Ical_${icaltype} ${icaltype}_map[] = {\n"
cat ${ICAL} |\
-sed -e 's;/\*.*\*/;;' -e 's;\t;;g' |\
-sed -nf /tmp/get_ical_data.sed |\
-sed -e "s;.*typedef *enum *${icaltype} *{\(.*\)} ${icaltype} *\;.*;\1,;" \
+
g
sed -e 's;/\*.*\*/;;' -e 's;\t;;g' |\
+
g
sed -nf /tmp/get_ical_data.sed |\
+
g
sed -e "s;.*typedef *enum *${icaltype} *{\(.*\)} ${icaltype} *\;.*;\1,;" \
-e 's;/\*.*\*/;;' \
-e 's;/;\n/\n;g' \
-e 's;,;,\n;g' \
-e 's; *;;g' \
-e 's;^t*;;g' \
-e 's;\=[0-9]*;;g'|\
-e 's;/\*.*\*/;;' \
-e 's;/;\n/\n;g' \
-e 's;,;,\n;g' \
-e 's; *;;g' \
-e 's;^t*;;g' \
-e 's;\=[0-9]*;;g'|\
-sed -e 's;\(.*\),;{HKEY("\1"), \1},;'
+
g
sed -e 's;\(.*\),;{HKEY("\1"), \1},;'
printf '{"", 0, 0}\n};\n\n\n'
done
printf '{"", 0, 0}\n};\n\n\n'
done