-/* -*- mode: C; c-file-style: "gnu" -*- */
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* dbus-marshal-byteswap.c Swap a block of marshaled data
*
* Copyright (C) 2005 Red Hat, Inc.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/
+#include <config.h>
#include "dbus-marshal-byteswap.h"
#include "dbus-marshal-basic.h"
#include "dbus-signature.h"
case DBUS_TYPE_BOOLEAN:
case DBUS_TYPE_INT32:
case DBUS_TYPE_UINT32:
+ case DBUS_TYPE_UNIX_FD:
{
p = _DBUS_ALIGN_ADDRESS (p, 4);
*((dbus_uint32_t*)p) = DBUS_UINT32_SWAP_LE_BE (*((dbus_uint32_t*)p));
case DBUS_TYPE_DOUBLE:
{
p = _DBUS_ALIGN_ADDRESS (p, 8);
-#ifdef DBUS_HAVE_INT64
*((dbus_uint64_t*)p) = DBUS_UINT64_SWAP_LE_BE (*((dbus_uint64_t*)p));
-#else
- _dbus_swap_array (p, 1, 8);
-#endif
p += 8;
}
break;
sig_len = *p;
++p;
- _dbus_string_init_const_len (&sig, p, sig_len);
+ _dbus_string_init_const_len (&sig, (const char *) p, sig_len);
p += (sig_len + 1); /* 1 for nul */
byteswap_body_helper (&reader, TRUE,
old_byte_order, new_byte_order,
- _dbus_string_get_data_len (value_str, value_pos, 0),
+ _dbus_string_get_udata_len (value_str, value_pos, 0),
NULL);
}