From: Wilfried Göesgens Date: Mon, 5 Mar 2007 23:44:03 +0000 (+0000) Subject: * create format strings different for solaris X-Git-Tag: v7.86~3541 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=819acff4ee67e603054de2790c171158265898c7 * create format strings different for solaris * some solaris build scripts --- diff --git a/citadel/acconfig.h b/citadel/acconfig.h index 63401969f..d654a01d7 100644 --- a/citadel/acconfig.h +++ b/citadel/acconfig.h @@ -65,6 +65,14 @@ #undef EGD_POOL +/* check for the solaris style getpwuid_r */ +#undef SOLARIS_GETPWUID -/* check for the bsd style getpwuid_r */ -#undef BSD_GETPWUID +/* we want our format strings to be acurate. */ +#undef F_UID_T + +/* we want our format strings to be acurate. */ +#undef F_PID_T + +/* we want our format strings to be acurate. */ +#undef F_XPID_T diff --git a/citadel/buildpackages b/citadel/buildpackages index 40cbf5ad5..f1ae0097f 100755 --- a/citadel/buildpackages +++ b/citadel/buildpackages @@ -39,9 +39,6 @@ fi case $1 in debian) - -#dpkg-source: warning: source directory `./citadel' is not - `citadel-6.61' - if grep -q "($CITADEL_VERSION" debian/changelog; then echo rebuilding package. else @@ -61,6 +58,43 @@ case $1 in else fakeroot dpkg-buildpackage fi + ;; + csw) + if !test -d ~/pkgs/; then + mkdir ~/pkgs + fi + echo " +PKG=CSWcitadel +NAME=citadel - The groupware server for Web 2.0 +VERSION=${PACKAGE_VERSION} +CATEGORY=application +VENDOR=http://www.citadel.org/ packaged for CSW by Wilfried Goesgens +HOTLINE=https://uncensored.citadel.org/ Room citadel support +EMAIL=citadel@outgesourced.org +" >~/pkgs/citadel + export LDFLAGS='-L/opt/csw/lib -L /usr/local/lib' + export CFLAGS='-I/opt/csw/include -I/usr/local/include -DDISABLE_CURSES' + ./configure \ + --with-db=/opt/csw/bdb44 \ + --with-ical=/usr/local/ \ + --without-curses \ + --with-prefix=/opt/csw/ \ + --with-datadir=/opt/csw/var/lib/citadel \ + --with-sysconfdir=/opt/csw/etc/citadel \ + --with-ssldir=/opt/csw/etc/ssl/citadel/ \ + --with-spooldir=/opt/csw/var/spool/citadel \ + --with-rundir=/opt/csw/var/run/citadel \ + --with-docdir=/opt/csw/share/doc/citadel-doc/ \ + --with-pam \ + --with-zlib \ + --with-ldap \ + --with-libsieve + + gmake citserver aidepost msgform citmail userlist sendcommand base64 whobbs citadel + gmake DESTDIR=$ACTUAL_DIR/cswstage install-new + + + ;; sourcedist) cd ..; tar --exclude .svn -cvzf citadel-$CITADEL_VERSION.tgz citadel-$CITADEL_VERSION/ diff --git a/citadel/config.c b/citadel/config.c index b466c3aca..35a25b8cb 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -55,7 +55,8 @@ void get_config(void) { } #ifndef __CYGWIN__ if (st.st_uid != CTDLUID) { - fprintf(stderr, "%s must be owned by uid=%ld but %ld owns it!\n", file_citadel_config, CTDLUID, st.st_uid); + fprintf(stderr, "%s must be owned by uid="F_UID_T" but "F_UID_T" owns it!\n", + file_citadel_config, CTDLUID, st.st_uid); exit(CTDLEXIT_CONFIG); } int desired_mode = (S_IFREG | S_IRUSR | S_IWUSR) ; diff --git a/citadel/configure.ac b/citadel/configure.ac index 2b5089e39..636dd7269 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -621,7 +621,14 @@ AC_CACHE_CHECK([for call semantics from getpwuid_r], ac_cv_call_getpwuid_r, ], ac_cv_call_getpwuid_r=yes, ac_cv_call_getpwuid_r=no)]) if test $ac_cv_call_getpwuid_r = no; then - AC_DEFINE(BSD_GETPWUID) + AC_DEFINE(SOLARIS_GETPWUID) + AC_DEFINE(F_UID_T, "%ld") + AC_DEFINE(F_PID_T, "%ld") + AC_DEFINE(F_XPID_T, "%lx") +else + AC_DEFINE(F_UID_T, "%d") + AC_DEFINE(F_PID_T, "%d") + AC_DEFINE(F_XPID_T, "%x") fi diff --git a/citadel/debian/changelog b/citadel/debian/changelog index f0a2d7f82..f6b9c8c48 100644 --- a/citadel/debian/changelog +++ b/citadel/debian/changelog @@ -1,4 +1,10 @@ -citadel (7.05-1) stable; urgency=low +citadel (7.05-9) stable; urgency=high + + * maintainance release, ical upgrade + + -- Wilfried Goesgens Thu, 1 Mar 2007 21:09:00 +0100 + +citadel (7.05-8) stable; urgency=low * Citadel 7.05 release diff --git a/citadel/server_main.c b/citadel/server_main.c index f5ee8dc7d..d831ec0f5 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -191,7 +191,7 @@ int main(int argc, char **argv) /* on some dists rundir gets purged on startup. so we need to recreate it. */ if (stat(ctdl_run_dir, &filestats)==-1){ -#ifdef BSD_GETPWUID +#ifdef SOLARIS_GETPWUID pwp = getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf)); #else getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp); @@ -241,7 +241,7 @@ int main(int argc, char **argv) * corresponding group ids */ if (drop_root_perms) { -#ifdef BSD_GETPWUID +#ifdef SOLARIS_GETPWUID pwp = getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf)); #else getpwuid_r(config.c_ctdluid, &pw, pwbuf, sizeof(pwbuf), &pwp); diff --git a/citadel/sysdep.c b/citadel/sysdep.c index d463421b4..b5b37a7dd 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -837,7 +837,7 @@ void start_daemon(int unused) { else { fp = fopen(file_pid_file, "w"); if (fp != NULL) { - fprintf(fp, "%ld\n", child); + fprintf(fp, ""F_PID_T"\n", child); fclose(fp); } waitpid(current_child, &status, 0); diff --git a/citadel/tools.c b/citadel/tools.c index 4927e18d4..0f85643ee 100644 --- a/citadel/tools.c +++ b/citadel/tools.c @@ -593,7 +593,7 @@ char *strcpy(char *dest, const char *src) { void generate_uuid(char *buf) { static int seq = 0; - sprintf(buf, "%lx-%x-%x", + sprintf(buf, "%lx-"F_XPID_T"-%x", time(NULL), getpid(), (seq++) @@ -670,7 +670,7 @@ void CtdlMakeTempFileName(char *name, int len) { int i = 0; while (i++, i < 100) { - snprintf(name, len, "/tmp/ctdl.%04x.%04x", + snprintf(name, len, "/tmp/ctdl."F_XPID_T".%04x", getpid(), rand() ); diff --git a/citadel/user_ops.c b/citadel/user_ops.c index db277c5ae..aa1330f10 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -367,7 +367,7 @@ int CtdlLoginExistingUser(char *trythisname) char pwdbuffer[256]; lprintf(CTDL_DEBUG, "asking host about <%s>\n", username); -#ifdef BSD_GETPWUID +#ifdef SOLARIS_GETPWUID tempPwdPtr = getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer); #else getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer, &tempPwdPtr); @@ -838,7 +838,7 @@ int create_user(char *newusername, int become_user) struct passwd *tempPwdPtr; char pwdbuffer[256]; -#ifdef BSD_GETPWUID +#ifdef SOLARIS_GETPWUID tempPwdPtr = getpwnam_r(username, &pd, pwdbuffer, sizeof(pwdbuffer)); #else getpwnam_r(username, &pd, pwdbuffer, sizeof pwdbuffer, &tempPwdPtr);