]> arthur.barton.de Git - netatalk.git/commitdiff
Merge remote-tracking branch 'origin/branch-netatalk-3-0' into develop
authorRalph Boehme <sloowfranklin@gmail.com>
Tue, 4 Jun 2013 10:38:23 +0000 (12:38 +0200)
committerRalph Boehme <sloowfranklin@gmail.com>
Tue, 4 Jun 2013 10:38:23 +0000 (12:38 +0200)
Conflicts:
NEWS

16 files changed:
NEWS
configure.ac
distrib/initscripts/rc.netbsd.tmpl
include/atalk/dsi.h
libatalk/dsi/dsi_close.c
libatalk/dsi/dsi_cmdreply.c
libatalk/dsi/dsi_getsess.c
libatalk/dsi/dsi_getstat.c
libatalk/dsi/dsi_opensess.c
libatalk/dsi/dsi_read.c
libatalk/dsi/dsi_stream.c
libatalk/dsi/dsi_tcp.c
libatalk/dsi/dsi_write.c
macros/db3-check.m4
macros/netatalk.m4
macros/summary.m4

diff --git a/NEWS b/NEWS
index 1cfeab2d9080a9f0ec5b44fc6c87c7ac0d939167..7adbb30d88b27081cf3cd8439583bc30363aff06 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,9 @@ Changes in 3.1.0
 * UPD: Add configure option --with-afpstats for overriding the
        result of autodetecting dbus-glib presence
 
+Changes in 3.0.5
+================
+
 Changes in 3.0.4
 ================
 * FIX: Opening files without metadata EA may result in an invalid
index 3c9cb98811dadabc2398545c60b4984ceb2d5857..a570f09711bfd67a00af627589d590ea22717727 100644 (file)
@@ -205,7 +205,7 @@ AC_NETATALK_LOCKFILE
 dnl Check for Docbook and build documentation if found
 AX_CHECK_DOCBOOK
 
-CFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include $CFLAGS"
+CPPFLAGS="-I\$(top_srcdir)/include -I\$(top_builddir)/include $CPPFLAGS"
 UAMS_PATH="${uams_path}"
 
 AC_SUBST(LIBS)
index 1f84c4398fa761bbd72d0ff71df7773dbf9959e4..af5602a581fc4dfe3e272718dc06e44225be1af7 100644 (file)
@@ -13,7 +13,7 @@ rcvar=$name
 command=":SBINDIR:/netatalk"
 etcdir=":ETCDIR:"
 pidfile="/var/run/${name}.pid"
-required_files="$etcdir/afp.conf
+required_files="$etcdir/afp.conf"
 
 load_rc_config $name
 run_rc_command "$1"
index 11452550fb14817be673860dc81cf4c93897f9a7..c816d96494398436a6be6972ff53bf6300a73a25 100644 (file)
@@ -48,7 +48,7 @@ struct dsi_block {
     union {
         uint32_t dsi_code;   /* error code */
         uint32_t dsi_doff;   /* data offset */
-    };
+    } dsi_data;
     uint32_t dsi_len;        /* total data length */
     uint32_t dsi_reserved;   /* reserved field */
 };
index 892b982eade06df3553c83ab2d7b00a876f1617b..199954fce69ccfdeca888cf4ab3277ccb0ca4d01 100644 (file)
@@ -21,7 +21,7 @@ void dsi_close(DSI *dsi)
       dsi->header.dsi_flags = DSIFL_REQUEST;
       dsi->header.dsi_command = DSIFUNC_CLOSE;
       dsi->header.dsi_requestID = htons(dsi_serverID(dsi));
-      dsi->header.dsi_code = dsi->header.dsi_reserved = htonl(0);
+      dsi->header.dsi_data.dsi_code = dsi->header.dsi_reserved = htonl(0);
       dsi->cmdlen = 0; 
       dsi_send(dsi);
       dsi->proto_close(dsi);
index 5b0d627de2c788e7356ffeb50219163d6007cb3c..04d17083351ea715cf89809c0cd3eb8189d4fef7 100644 (file)
@@ -25,7 +25,7 @@ int dsi_cmdreply(DSI *dsi, const int err)
 
     dsi->header.dsi_flags = DSIFL_REPLY;
     dsi->header.dsi_len = htonl(dsi->datalen);
-    dsi->header.dsi_code = htonl(err);
+    dsi->header.dsi_data.dsi_code = htonl(err);
 
     ret = dsi_stream_send(dsi, dsi->data, dsi->datalen);
 
index 38477be99e1ac18b9f7e22a22f8cc28500c4fe83..a928d34ee38d8f23f9fd34350198d00fffc91e75 100644 (file)
@@ -65,9 +65,9 @@ int dsi_getsession(DSI *dsi, server_child_t *serv_children, int tickleval, afp_c
       LOG(log_error, logtype_dsi, "dsi_getsess: %s", strerror(errno));
       close(ipc_fds[0]);
       dsi->header.dsi_flags = DSIFL_REPLY;
-      dsi->header.dsi_code = DSIERR_SERVBUSY;
+      dsi->header.dsi_data.dsi_code = DSIERR_SERVBUSY;
       dsi_send(dsi);
-      dsi->header.dsi_code = DSIERR_OK;
+      dsi->header.dsi_data.dsi_code = DSIERR_OK;
       kill(pid, SIGKILL);
     }
     dsi->proto_close(dsi);
@@ -81,7 +81,7 @@ int dsi_getsession(DSI *dsi, server_child_t *serv_children, int tickleval, afp_c
       (dsi->header.dsi_command == DSIFUNC_OPEN)) {
     LOG(log_info, logtype_dsi, "dsi_getsess: too many connections");
     dsi->header.dsi_flags = DSIFL_REPLY;
-    dsi->header.dsi_code = DSIERR_TOOMANY;
+    dsi->header.dsi_data.dsi_code = DSIERR_TOOMANY;
     dsi_send(dsi);
     exit(EXITERR_CLNT);
   }
index dac4f76b3760efa38c650d5e7b21dc7ba42d71d6..4be9b802175fc218f3867a6655eb84a602783290 100644 (file)
@@ -20,7 +20,7 @@ void dsi_getstatus(DSI *dsi)
 {
   dsi->header.dsi_flags = DSIFL_REPLY;
   /*dsi->header.dsi_command = DSIFUNC_STAT;*/
-  dsi->header.dsi_code = dsi->header.dsi_reserved = 0;
+  dsi->header.dsi_data.dsi_code = dsi->header.dsi_reserved = 0;
   
   memcpy(dsi->commands, dsi->status, dsi->statuslen);
   dsi->cmdlen = dsi->statuslen; 
index a2dcb4c9b0d6c11177eca4cd0eea24344a63163f..2945f9b185f242de3a6a767f1c8d3a5e281ee38e 100644 (file)
@@ -44,7 +44,7 @@ void dsi_opensession(DSI *dsi)
   /* let the client know the server quantum. we don't use the
    * max server quantum due to a bug in appleshare client 3.8.6. */
   dsi->header.dsi_flags = DSIFL_REPLY;
-  dsi->header.dsi_code = 0;
+  dsi->header.dsi_data.dsi_code = 0;
   /* dsi->header.dsi_command = DSIFUNC_OPEN;*/
 
   dsi->cmdlen = 2 * (2 + sizeof(i)); /* length of data. dsi_send uses it. */
index a0cbd872c2851a7ef2ba14021a52138f4a03d7ad..31ee3bdff4a9191327b808061c6979c8ae4a0dcf 100644 (file)
@@ -31,7 +31,7 @@ ssize_t dsi_readinit(DSI *dsi, void *buf, const size_t buflen, const size_t size
     dsi->flags |= DSI_NOREPLY; /* we will handle our own replies */
     dsi->header.dsi_flags = DSIFL_REPLY;
     dsi->header.dsi_len = htonl(size);
-    dsi->header.dsi_code = htonl(err);
+    dsi->header.dsi_data.dsi_code = htonl(err);
 
     dsi->in_write++;
     if (dsi_stream_send(dsi, buf, buflen)) {
index 94890dd8014341bbe6ccb02393f35a5456c9775c..770258c5b6978839e9e4e00a926a43bd8dd486c7 100644 (file)
@@ -45,7 +45,7 @@ static void dsi_header_pack_reply(const DSI *dsi, char *buf)
     buf[0] = dsi->header.dsi_flags;
     buf[1] = dsi->header.dsi_command;
     memcpy(buf + 2, &dsi->header.dsi_requestID, sizeof(dsi->header.dsi_requestID));           
-    memcpy(buf + 4, &dsi->header.dsi_code, sizeof(dsi->header.dsi_code));
+    memcpy(buf + 4, &dsi->header.dsi_data.dsi_code, sizeof(dsi->header.dsi_data.dsi_code));
     memcpy(buf + 8, &dsi->header.dsi_len, sizeof(dsi->header.dsi_len));
     memcpy(buf + 12, &dsi->header.dsi_reserved, sizeof(dsi->header.dsi_reserved));
 }
@@ -366,7 +366,7 @@ ssize_t dsi_stream_read_file(DSI *dsi, const int fromfd, off_t offset, const siz
     dsi->flags |= DSI_NOREPLY;
     dsi->header.dsi_flags = DSIFL_REPLY;
     dsi->header.dsi_len = htonl(length);
-    dsi->header.dsi_code = htonl(err);
+    dsi->header.dsi_data.dsi_code = htonl(err);
     dsi_header_pack_reply(dsi, block);
 
 #ifdef HAVE_SENDFILEV
@@ -615,7 +615,7 @@ int dsi_stream_receive(DSI *dsi)
       return 0;
 
   memcpy(&dsi->header.dsi_requestID, block + 2, sizeof(dsi->header.dsi_requestID));
-  memcpy(&dsi->header.dsi_code, block + 4, sizeof(dsi->header.dsi_code));
+  memcpy(&dsi->header.dsi_data.dsi_code, block + 4, sizeof(dsi->header.dsi_data.dsi_code));
   memcpy(&dsi->header.dsi_len, block + 8, sizeof(dsi->header.dsi_len));
   memcpy(&dsi->header.dsi_reserved, block + 12, sizeof(dsi->header.dsi_reserved));
   dsi->clientID = ntohs(dsi->header.dsi_requestID);
index f73147a81a9565309bcbe518042edf1f6865e106..731252e6b13314ae11e8bf2e2b57304764c696f3 100644 (file)
@@ -209,7 +209,7 @@ static pid_t dsi_tcp_open(DSI *dsi)
         dsi->header.dsi_command = block[1];
         memcpy(&dsi->header.dsi_requestID, block + 2,
                sizeof(dsi->header.dsi_requestID));
-        memcpy(&dsi->header.dsi_code, block + 4, sizeof(dsi->header.dsi_code));
+        memcpy(&dsi->header.dsi_data.dsi_code, block + 4, sizeof(dsi->header.dsi_data.dsi_code));
         memcpy(&dsi->header.dsi_len, block + 8, sizeof(dsi->header.dsi_len));
         memcpy(&dsi->header.dsi_reserved, block + 12,
                sizeof(dsi->header.dsi_reserved));
index 65a479e1dac4a89d09fd5785b623715f382d6988..dc35cafa9307a76df2f407dddf9f2f4c704b577a 100644 (file)
@@ -32,7 +32,7 @@ size_t dsi_writeinit(DSI *dsi, void *buf, const size_t buflen _U_)
 
   /* figure out how much data we have. do a couple checks for 0 
    * data */
-  header = ntohl(dsi->header.dsi_doff);
+  header = ntohl(dsi->header.dsi_data.dsi_doff);
   dsi->datasize = header ? ntohl(dsi->header.dsi_len) - header : 0;
 
   if (dsi->datasize > 0) {
index 902220befa3581e0a1d6a9dea9bc4a850e4ea599..4135e5ce2801915853e598ef0f8596726b4bcc42 100644 (file)
@@ -155,6 +155,9 @@ if test "x$bdb_required" = "xyes"; then
                         if test x"${atalk_cv_bdb_version}" = x"yes"; then
                             BDB_CFLAGS="-I${bdbdir}/include${subdir}"
                             BDB_LIBS="-L${bdblibdir} ${atalk_cv_lib_db}"
+                            if test x"$need_dash_r" = x"yes"; then
+                                BDB_LIBS="$BDB_LIBS -R${bdblibdir}"
+                            fi
                             BDB_BIN="$bdbbindir"
                             BDB_PATH="$bdbdir"
                             bdbfound=yes
@@ -178,6 +181,9 @@ if test "x$bdb_required" = "xyes"; then
                            if test x"${atalk_cv_bdb_version}" = x"yes"; then
                               BDB_CFLAGS="-I${bdbdir}/include${subdir}"
                               BDB_LIBS="-L${bdblibdir} ${atalk_cv_lib_db}"
+                              if test x"$need_dash_r" = x"yes"; then
+                                 BDB_LIBS="$BDB_LIBS -R${bdblibdir}"
+                              fi
                               BDB_BIN="$bdbbindir"
                               BDB_PATH="$bdbdir"
                               bdbfound=yes
index e54627ae8de81dab88871f3225a04321e60d7800..b2116beac0e96b15c1536323ce1cf44bc38b31cf 100644 (file)
@@ -654,87 +654,8 @@ if test x"$this_os" = "xsolaris"; then
        AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
     AC_DEFINE(_XOPEN_SOURCE, 600, [Solaris compilation environment])
     AC_DEFINE(__EXTENSIONS__,  1, [Solaris compilation environment])
-       CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
        need_dash_r=yes
        init_style=solaris
-
-       solaris_module=no
-       AC_MSG_CHECKING([if we can build Solaris kernel module])
-       if test -x /usr/ccs/bin/ld && test x"$netatalk_cv_ddp_enabled" = x"yes" ; then
-               solaris_module=yes
-       fi
-       AC_MSG_RESULT([$solaris_module])
-
-       COMPILE_64BIT_KMODULE=no
-       KCFLAGS=""
-       KLDFLAGS=""
-       COMPILE_KERNEL_GCC=no
-
-       if test "$solaris_module" = "yes"; then
-          dnl Solaris kernel module stuff
-           AC_MSG_CHECKING([if we have to build a 64bit kernel module])
-
-          # check for isainfo, if not found it has to be a 32 bit kernel (<=2.6)       
-          if test -x /usr/bin/isainfo; then
-               # check for 64 bit platform
-               if isainfo -kv | grep '^64-bit'; then
-                       COMPILE_64BIT_KMODULE=yes
-               fi
-          fi
-
-          AC_MSG_RESULT([$COMPILE_64BIT_KMODULE])
-
-          if test "${GCC}" = yes; then
-               COMPILE_KERNEL_GCC=yes
-               if test "$COMPILE_64BIT_KMODULE" = yes; then
-               
-                        AC_MSG_CHECKING([if we can build a 64bit kernel module])
-                       
-                        case `$CC --version 2>/dev/null` in
-                       [[12]].* | 3.0.*)
-                               COMPILE_64BIT_KMODULE=no
-                               COMPILE_KERNEL_GCC=no   
-                               solaris_module=no;;
-                       *)
-                               # use for 64 bit
-                               KCFLAGS="-m64"
-                               #KLDFLAGS="-melf64_sparc"
-                               KLDFLAGS="-64";;
-                       esac    
-                       
-                       AC_MSG_RESULT([$COMPILE_64BIT_KMODULE])
-                       
-               else
-                       KCFLAGS=""
-                       KLDFLAGS=""
-               fi
-               KCFLAGS="$KCFLAGS -D_KERNEL -Wall -Wstrict-prototypes"
-           else
-               if test "$COMPILE_64BIT_KMODULE" = yes; then
-                # use Sun CC (for a 64-bit kernel, uncomment " -xarch=v9 -xregs=no%appl ")
-                       KCFLAGS="-xarch=v9 -xregs=no%appl"
-                       KLDFLAGS="-64"
-               else
-                       KCFLAGS=""
-                       KLDFLAGS=""
-               fi
-               KCFLAGS="-D_KERNEL $KCFLAGS -mno-app-regs -munaligned-doubles -fpcc-struct-return"
-          fi
-
-           AC_CACHE_CHECK([for timeout_id_t],netatalk_cv_HAVE_TIMEOUT_ID_T,[
-           AC_LINK_IFELSE([AC_LANG_PROGRAM([[\
-#include <sys/stream.h>
-#include <sys/ddi.h>]], [[\
-timeout_id_t dummy;
-]])],[netatalk_cv_HAVE_TIMEOUT_ID_T=yes],[netatalk_cv_HAVE_TIMEOUT_ID_T=no])])
-
-          AC_DEFINE(HAVE_TIMEOUT_ID_T, test x"$netatalk_cv_HAVE_TIMEOUT_ID" = x"yes", [define for timeout_id_t])
-       fi
-
-       AC_SUBST(COMPILE_KERNEL_GCC)
-       AC_SUBST(COMPILE_64BIT_KMODULE)
-       AC_SUBST(KCFLAGS)
-       AC_SUBST(KLDFLAGS)
 fi
 
 dnl Whether to run ldconfig after installing libraries
index 5dde4073d2ae4bf554bd73be1330fd93c6ba5f19..cf64f2a61083292444b99cf0a24100389dac5cbf 100644 (file)
@@ -84,9 +84,10 @@ AC_DEFUN([AC_NETATALK_LIBS_SUMMARY], [
        dnl #################################################
        dnl # Display summary of libraries detected
 
-       AC_MSG_RESULT([Using libraries:])
-       AC_MSG_RESULT([    LIBS           = $LIBS])
+       AC_MSG_RESULT([Compilation summary:])
+       AC_MSG_RESULT([    CPPFLAGS       = $CPPFLAGS])
        AC_MSG_RESULT([    CFLAGS         = $CFLAGS])
+       AC_MSG_RESULT([    LIBS           = $LIBS])
        AC_MSG_RESULT([    PTHREADS:])
        AC_MSG_RESULT([        LIBS   = $PTHREAD_LIBS])
        AC_MSG_RESULT([        CFLAGS = $PTHREAD_CFLAGS])