From 11b790da92082ff80b9060e0b1dc6678718601c8 Mon Sep 17 00:00:00 2001 From: Nathan Bryant Date: Tue, 22 Jul 2003 03:07:50 +0000 Subject: [PATCH] fix build for Solaris --- citadel/ChangeLog | 4 +++- citadel/Makefile.in | 3 ++- citadel/aidepost.c | 4 ++-- citadel/configure.ac | 1 - citadel/file_ops.c | 8 ++++---- citadel/routines2.c | 5 +++++ 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 872ebd5e3..7398fc499 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 608.5 2003/07/22 03:07:50 nbryant + fix build for Solaris + Revision 608.4 2003/07/20 20:46:06 ajc * build system: link Berkeley DB only to the server, not to the client & utils @@ -4881,4 +4884,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/Makefile.in b/citadel/Makefile.in index 53a283d55..9fc07608f 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -141,8 +141,9 @@ aidepost: aidepost.o config.o citmail: citmail.o config.o $(CC) citmail.o config.o $(LDFLAGS) -o citmail $(LIBS) +# setup does need LIBS defined, because it uses network functions which are in -lsocket -lnsl on Solaris. setup: setup.o tools.o - $(CC) setup.o tools.o $(SETUP_LIBS) $(LDFLAGS) -o setup + $(CC) setup.o tools.o $(LDFLAGS) -o setup $(LIBS) $(SETUP_LIBS) chkpwd: chkpwd.o auth.o config.o $(CC) chkpwd.o auth.o config.o $(LDFLAGS) -o chkpwd $(chkpwd_LIBS) diff --git a/citadel/aidepost.c b/citadel/aidepost.c index 56f578134..3591ff896 100644 --- a/citadel/aidepost.c +++ b/citadel/aidepost.c @@ -98,8 +98,8 @@ int main(int argc, char **argv) } snprintf(tempspool, sizeof tempspool, - "./network/spoolin/ap.%04x", - getpid()); + "./network/spoolin/ap.%04lx", + (long)getpid()); unlink(tempspool); diff --git a/citadel/configure.ac b/citadel/configure.ac index d95d0968e..b18a71902 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -111,7 +111,6 @@ if test "$GCC" = yes; then ;; esac fi -AC_DISABLE_STATIC AC_PROG_INSTALL AC_PROG_YACC missing_dir=`cd $ac_aux_dir && pwd` diff --git a/citadel/file_ops.c b/citadel/file_ops.c index f45099e39..7a6a771cd 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -270,8 +270,8 @@ void cmd_netf(char *cmdbuf) return; } snprintf(outfile, sizeof outfile, - "%s/network/spoolin/nsf.%04x.%04x", - BBSDIR, getpid(), ++seq); + "%s/network/spoolin/nsf.%04lx.%04x", + BBSDIR, (long)getpid(), ++seq); ofp = fopen(outfile, "a"); if (ofp == NULL) { cprintf("%d internal error\n", ERROR); @@ -801,8 +801,8 @@ void cmd_nuop(char *cmdbuf) } snprintf(CC->upl_path, sizeof CC->upl_path, - "%s/network/spoolin/%s.%04x.%04x", - BBSDIR, CC->net_node, getpid(), ++seq); + "%s/network/spoolin/%s.%04lx.%04x", + BBSDIR, CC->net_node, (long)getpid(), ++seq); CC->upload_fp = fopen(CC->upl_path, "r"); if (CC->upload_fp != NULL) { diff --git a/citadel/routines2.c b/citadel/routines2.c index ba73090c2..374464cbb 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -44,6 +44,11 @@ #endif #include "screen.h" +/* work around solaris include files */ +#ifdef reg +#undef reg +#endif + extern char temp[]; extern char tempdir[]; extern char *axdefs[7]; -- 2.30.2