--------------------- PatchSet 8638 Date: 2006/09/15 19:20:23 Author: serassio Branch: nt Tag: (none) Log: Updated coss support and portability fixes Members: port/win32/Makefile.am:1.1.14.8->1.1.14.9 port/win32/squid.dsw:1.1.38.8->1.1.38.9 port/win32/squid_mswin.mak:1.1.38.5->1.1.38.6 port/win32/include/autoconf.h:1.1.38.13->1.1.38.14 port/win32/libcoss/.cvsignore:1.1->1.1.28.1 port/win32/libcoss/libcoss.dsp:1.1->1.1.28.1 src/wccp2.c:1.3.2.14->1.3.2.15 src/fs/aufs/store_dir_aufs.c:1.35.8.13->1.35.8.14 src/fs/coss/aio_win32.c:1.1.2.1->1.1.2.2 src/fs/coss/aio_win32.h:1.1.2.1->1.1.2.2 src/fs/coss/store_dir_coss.c:1.26.8.13->1.26.8.14 src/fs/coss/store_io_coss.c:1.15.8.11->1.15.8.12 Index: squid/port/win32/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/Attic/Makefile.am,v retrieving revision 1.1.14.8 retrieving revision 1.1.14.9 diff -u -r1.1.14.8 -r1.1.14.9 --- squid/port/win32/Makefile.am 9 Sep 2006 12:57:08 -0000 1.1.14.8 +++ squid/port/win32/Makefile.am 15 Sep 2006 19:20:23 -0000 1.1.14.9 @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in # -# $Id: Makefile.am,v 1.1.14.8 2006/09/09 12:57:08 serassio Exp $ +# $Id: Makefile.am,v 1.1.14.9 2006/09/15 19:20:23 serassio Exp $ # EXTRA_DIST = \ @@ -37,6 +37,7 @@ LDAP_group/LDAP_group.dsp \ libaufs/libaufs.dsp \ libbasic/libbasic.dsp \ + libcoss/libcoss.dsp \ libdigest/libdigest.dsp \ libgnuregex/libgnuregex.dsp \ libheap/libheap.dsp \ Index: squid/port/win32/squid.dsw =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/Attic/squid.dsw,v retrieving revision 1.1.38.8 retrieving revision 1.1.38.9 diff -u -r1.1.38.8 -r1.1.38.9 --- squid/port/win32/squid.dsw 9 Sep 2006 12:57:08 -0000 1.1.38.8 +++ squid/port/win32/squid.dsw 15 Sep 2006 19:20:23 -0000 1.1.38.9 @@ -321,6 +321,21 @@ ############################################################################### +Project: "libcoss"=".\libcoss\libcoss.dsp" - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name modules + End Project Dependency +}}} + +############################################################################### + Project: "libdigest"=".\libdigest\libdigest.dsp" - Package Owner=<4> Package=<5> @@ -641,6 +656,9 @@ Begin Project Dependency Project_Dep_Name libaufs End Project Dependency + Begin Project Dependency + Project_Dep_Name libcoss + End Project Dependency }}} ############################################################################### Index: squid/port/win32/squid_mswin.mak =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/Attic/squid_mswin.mak,v retrieving revision 1.1.38.5 retrieving revision 1.1.38.6 diff -u -r1.1.38.5 -r1.1.38.6 --- squid/port/win32/squid_mswin.mak 9 Sep 2006 12:30:38 -0000 1.1.38.5 +++ squid/port/win32/squid_mswin.mak 15 Sep 2006 19:20:23 -0000 1.1.38.6 @@ -51,7 +51,7 @@ AUTH_MODULES = basic ntlm digest negotiate REPL_POLICIES = lru heap -STORE_MODULES = ufs aufs null +STORE_MODULES = ufs aufs null coss SUBSTITUTE=sed "\ s%@DEFAULT_CONFIG_FILE@%$(DEFAULT_CONFIG_FILE)%g;\ Index: squid/port/win32/include/autoconf.h =================================================================== RCS file: /cvsroot/squid-sf//squid/port/win32/include/Attic/autoconf.h,v retrieving revision 1.1.38.13 retrieving revision 1.1.38.14 diff -u -r1.1.38.13 -r1.1.38.14 --- squid/port/win32/include/autoconf.h 9 Sep 2006 12:30:38 -0000 1.1.38.13 +++ squid/port/win32/include/autoconf.h 15 Sep 2006 19:20:23 -0000 1.1.38.14 @@ -929,7 +929,7 @@ #define STR_USE_ARP_ACL "" #endif -#define SQUID_CONFIGURE_OPTIONS "--enable-win32-service --enable-storeio='ufs aufs null' " \ +#define SQUID_CONFIGURE_OPTIONS "--enable-win32-service --enable-storeio='ufs aufs null coss' " \ "--enable-removal-policies='heap lru' --enable-snmp --enable-htcp --disable-wccp --disable-wccpv2 --enable-useragent-log " \ "--enable-referer-log --enable-cache-digests --enable-auth='basic ntlm digest negotiate' " \ "--enable-basic-auth-helpers='LDAP NCSA mswin_sspi' --enable-negotiate-auth-helpers=mswin_sspi" \ --- /dev/null Wed Feb 14 01:16:58 2007 +++ squid/port/win32/libcoss/.cvsignore Wed Feb 14 01:17:07 2007 @@ -0,0 +1,3 @@ +.cvsignore +Debug +Release --- /dev/null Wed Feb 14 01:16:58 2007 +++ squid/port/win32/libcoss/libcoss.dsp Wed Feb 14 01:17:07 2007 @@ -0,0 +1,120 @@ +# Microsoft Developer Studio Project File - Name="libcoss" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Static Library" 0x0104 + +CFG=libcoss - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "libcoss.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "libcoss.mak" CFG="libcoss - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "libcoss - Win32 Release" (based on "Win32 (x86) Static Library") +!MESSAGE "libcoss - Win32 Debug" (based on "Win32 (x86) Static Library") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "libcoss - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /I "../../../include" /I "../../../src" /I "../include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /c +# ADD BASE RSC /l 0x410 /d "NDEBUG" +# ADD RSC /l 0x410 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ELSEIF "$(CFG)" == "libcoss - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c +# ADD CPP /nologo /G6 /MTd /W3 /Gm /GX /ZI /Od /I "../../../include" /I "../../../src" /I "../include" /D "_DEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D "HAVE_CONFIG_H" /D _FILE_OFFSET_BITS=64 /YX /FD /GZ /c +# ADD BASE RSC /l 0x410 /d "_DEBUG" +# ADD RSC /l 0x410 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LIB32=link.exe -lib +# ADD BASE LIB32 /nologo +# ADD LIB32 /nologo + +!ENDIF + +# Begin Target + +# Name "libcoss - Win32 Release" +# Name "libcoss - Win32 Debug" +# Begin Group "Source Files" + +# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\aio_win32.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\async_io.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\store_dir_coss.c +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\store_io_coss.c +# End Source File +# End Group +# Begin Group "Header Files" + +# PROP Default_Filter "h;hpp;hxx;hm;inl" +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\aio_win32.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\async_io.h +# End Source File +# Begin Source File + +SOURCE=..\..\..\src\fs\coss\store_coss.h +# End Source File +# End Group +# End Target +# End Project Index: squid/src/wccp2.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/wccp2.c,v retrieving revision 1.3.2.14 retrieving revision 1.3.2.15 diff -u -r1.3.2.14 -r1.3.2.15 --- squid/src/wccp2.c 31 Jul 2006 10:22:00 -0000 1.3.2.14 +++ squid/src/wccp2.c 15 Sep 2006 19:20:23 -0000 1.3.2.15 @@ -1,6 +1,6 @@ /* - * $Id: wccp2.c,v 1.3.2.14 2006/07/31 10:22:00 serassio Exp $ + * $Id: wccp2.c,v 1.3.2.15 2006/09/15 19:20:23 serassio Exp $ * * DEBUG: section 80 WCCP Support * AUTHOR: Steven WIlton @@ -359,7 +359,7 @@ wccp2_update_service(wccp2_service_list_ptr, service, service_id, service_priority, service_proto, service_flags, ports); wccp2_service_list_ptr->wccp2_security_type = security_type; - bzero(wccp2_service_list_ptr->wccp_password, WCCP2_PASSWORD_LEN + 1); + memset(wccp2_service_list_ptr->wccp_password, 0, WCCP2_PASSWORD_LEN + 1); strncpy(wccp2_service_list_ptr->wccp_password, password, WCCP2_PASSWORD_LEN); /* add to linked list - XXX this should use the Squid dlink* routines! */ wccp2_service_list_ptr->next = wccp2_service_list_head; @@ -397,7 +397,7 @@ debug(80, 5) ("wccp2_update_md5_security: called\n"); /* The password field, for the MD5 hash, needs to be 8 bytes and NUL padded. */ - bzero(pwd, sizeof(pwd)); + memset(pwd, 0, sizeof(pwd)); strncpy(pwd, password, sizeof(pwd)); ws = (struct wccp2_security_md5_t *) ptr; assert(ntohs(ws->security_type) == WCCP2_SECURITY_INFO); @@ -413,7 +413,7 @@ * area should be zero'ed before calculating the MD5 hash. */ /* XXX eventually we should be able to kill md5_digest and blit it directly in */ - bzero(ws->security_implementation, sizeof(ws->security_implementation)); + memset(ws->security_implementation, 0, sizeof(ws->security_implementation)); MD5Init(&M); MD5Update(&M, pwd, 8); MD5Update(&M, packet, len); @@ -450,12 +450,12 @@ /* If execution makes it here then we have an MD5 security */ /* The password field, for the MD5 hash, needs to be 8 bytes and NUL padded. */ - bzero(pwd, sizeof(pwd)); + memset(pwd, 0, sizeof(pwd)); strncpy(pwd, srv->wccp_password, sizeof(pwd)); /* Take a copy of the challenge: we need to NUL it before comparing */ memcpy(md5_challenge, ws->security_implementation, 16); - bzero(ws->security_implementation, sizeof(ws->security_implementation)); + memset(ws->security_implementation, 0, sizeof(ws->security_implementation)); MD5Init(&M); MD5Update(&M, pwd, 8); MD5Update(&M, packet, len); @@ -1451,7 +1451,7 @@ return; } debug(80, 5) ("parse_wccp2_service_info: called\n"); - bzero(portlist, sizeof(portlist)); + memset(portlist, 0, sizeof(portlist)); /* First argument: id */ service_id = GetInteger(); if (service_id < 0 || service_id > 255) { Index: squid/src/fs/aufs/store_dir_aufs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/aufs/store_dir_aufs.c,v retrieving revision 1.35.8.13 retrieving revision 1.35.8.14 diff -u -r1.35.8.13 -r1.35.8.14 --- squid/src/fs/aufs/store_dir_aufs.c 9 Sep 2006 12:30:42 -0000 1.35.8.13 +++ squid/src/fs/aufs/store_dir_aufs.c 15 Sep 2006 19:20:23 -0000 1.35.8.14 @@ -1696,13 +1696,13 @@ x = storeDirGetUFSStats(SD->path, &totl_kb, &free_kb, &totl_in, &free_in); if (0 == x) { #ifdef HAVE_STATVFS - storeAppendPrintf(sentry, "Filesystem Space in use: %llu/%llu KB (%.0f%%)\n", - (unsigned long long) (totl_kb - free_kb), - (unsigned long long) totl_kb, + storeAppendPrintf(sentry, "Filesystem Space in use: %" PRIu64 "/%" PRIu64 " KB (%.0f%%)\n", + (uint64_t) (totl_kb - free_kb), + (uint64_t) totl_kb, dpercent(totl_kb - free_kb, totl_kb)); - storeAppendPrintf(sentry, "Filesystem Inodes in use: %llu/%llu (%.0f%%)\n", - (unsigned long long) (totl_in - free_in), - (unsigned long long) totl_in, + storeAppendPrintf(sentry, "Filesystem Inodes in use: %" PRIu64 "/%" PRIu64 " (%.0f%%)\n", + (uint64_t) (totl_in - free_in), + (uint64_t) totl_in, dpercent(totl_in - free_in, totl_in)); #else storeAppendPrintf(sentry, "Filesystem Space in use: %d/%d KB (%d%%)\n", Index: squid/src/fs/coss/aio_win32.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/coss/Attic/aio_win32.c,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/src/fs/coss/aio_win32.c 13 Sep 2006 07:07:24 -0000 1.1.2.1 +++ squid/src/fs/coss/aio_win32.c 15 Sep 2006 19:20:24 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: aio_win32.c,v 1.1.2.1 2006/09/13 07:07:24 serassio Exp $ + * $Id: aio_win32.c,v 1.1.2.2 2006/09/15 19:20:24 serassio Exp $ * * DEBUG: section 81 aio_xxx() POSIX emulation on Windows * AUTHOR: Guido Serassio @@ -33,9 +33,7 @@ * */ -#include "util.h" -#include -#include +#include "squid.h" #include "aio_win32.h" #ifdef _SQUID_WIN32_ @@ -149,7 +147,7 @@ } -int aio_open(const char *path, int mode, int mask) +int aio_open(const char *path, int mode) { HANDLE hndl; DWORD dwCreationDisposition; Index: squid/src/fs/coss/aio_win32.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/coss/Attic/aio_win32.h,v retrieving revision 1.1.2.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/src/fs/coss/aio_win32.h 13 Sep 2006 07:07:24 -0000 1.1.2.1 +++ squid/src/fs/coss/aio_win32.h 15 Sep 2006 19:20:24 -0000 1.1.2.2 @@ -1,5 +1,5 @@ /* - * $Id: aio_win32.h,v 1.1.2.1 2006/09/13 07:07:24 serassio Exp $ + * $Id: aio_win32.h,v 1.1.2.2 2006/09/15 19:20:24 serassio Exp $ * * aio_xxx() POSIX emulation on WIN32 for COSS * AUTHOR: Guido Serassio @@ -51,10 +51,8 @@ int aio_fildes; /* file descriptor */ void *aio_buf; /* buffer location */ size_t aio_nbytes; /* length of transfer */ -#if __USE_FILE_OFFSET64 - off64_t aio_offset; /* file offset */ -#else off_t aio_offset; /* file offset */ +#ifndef __USE_FILE_OFFSET64 char __pad[sizeof (int64_t) - sizeof (off_t)]; #endif int aio_reqprio; /* request priority offset */ @@ -66,5 +64,5 @@ int aio_write(struct aiocb *); ssize_t aio_return(struct aiocb *); int aio_error(const struct aiocb *); -int aio_open(const char *, int, int); +int aio_open(const char *, int); void aio_close(int); Index: squid/src/fs/coss/store_dir_coss.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/coss/store_dir_coss.c,v retrieving revision 1.26.8.13 retrieving revision 1.26.8.14 diff -u -r1.26.8.13 -r1.26.8.14 --- squid/src/fs/coss/store_dir_coss.c 13 Sep 2006 07:07:24 -0000 1.26.8.13 +++ squid/src/fs/coss/store_dir_coss.c 15 Sep 2006 19:20:24 -0000 1.26.8.14 @@ -34,7 +34,11 @@ */ #include "squid.h" +#ifdef _SQUID_WIN32_ +#include "aio_win32.h" +#else #include +#endif #include "async_io.h" #include "store_coss.h" @@ -1227,8 +1231,8 @@ debug(47, 3) ("COSS: %s: stripe %d: filen %d: header size %d\n", SD->path, cs->rebuild.curstripe, filen, bl); /* COSS objects will have an object size written into the metadata */ - bzero(&tmpe, sizeof(tmpe)); - bzero(key, sizeof(key)); + memset(&tmpe, 0, sizeof(tmpe)); + memset(key, 0, sizeof(key)); for (t = tlv_list; t; t = t->next) { switch (t->type) { case STORE_META_URL: Index: squid/src/fs/coss/store_io_coss.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/coss/store_io_coss.c,v retrieving revision 1.15.8.11 retrieving revision 1.15.8.12 diff -u -r1.15.8.11 -r1.15.8.12 --- squid/src/fs/coss/store_io_coss.c 13 Sep 2006 07:07:24 -0000 1.15.8.11 +++ squid/src/fs/coss/store_io_coss.c 15 Sep 2006 19:20:24 -0000 1.15.8.12 @@ -126,7 +126,7 @@ cs->current_memonly_offset = ((cs->current_memonly_offset + cs->blksz_mask) >> cs->blksz_bits) << cs->blksz_bits; f = storeCossDiskOffsetToFileno(retofs, cs); assert(f >= 0 && f <= 0xffffff); - debug(79, 3) ("storeCossMemOnlyAllocate: offset %lld, filen: %d\n", (long long int) retofs, f); + debug(79, 3) ("storeCossMemOnlyAllocate: offset %" PRId64 ", filen: %d\n", (int64_t) retofs, f); return f; } @@ -212,8 +212,8 @@ cs->current_offset = cs->current_membuf->diskend; storeCossMaybeWriteMemBuf(SD, cs->current_membuf); /* cs->current_membuf may be invalid at this point */ - debug(79, 3) ("storeCossAllocate: %s: New offset - %lld\n", SD->path, - (long long int) cs->current_offset); + debug(79, 3) ("storeCossAllocate: %s: New offset - %" PRId64 "\n", SD->path, + (int64_t) cs->current_offset); assert(cs->curstripe < (cs->numstripes - 1)); newmb = storeCossCreateMemBuf(SD, cs->curstripe + 1, checkf, &coll); cs->current_membuf = newmb; @@ -231,7 +231,7 @@ cs->current_offset = ((cs->current_offset + cs->blksz_mask) >> cs->blksz_bits) << cs->blksz_bits; f = storeCossDiskOffsetToFileno(retofs, cs); assert(f >= 0 && f <= 0xffffff); - debug(79, 3) ("storeCossAllocate: offset %lld, filen: %d\n", (long long int) retofs, f); + debug(79, 3) ("storeCossAllocate: offset %" PRId64 ", filen: %d\n", (int64_t) retofs, f); /* * Keep track of the largest object we can accept based on the @@ -742,7 +742,7 @@ /* XXX The last stripe, for now, ain't the coss stripe size for some reason */ /* XXX This may cause problems later on; worry about figuring it out later on */ //assert(t->diskend - t->diskstart == COSS_MEMBUF_SZ); - debug(79, 3) ("aioWrite: FD %d: disk start: %llu, size %llu\n", cs->fd, (long long int) t->diskstart, (long long int) t->diskend - t->diskstart); + debug(79, 3) ("aioWrite: FD %d: disk start: %" PRIu64 ", size %" PRIu64 "\n", cs->fd, (uint64_t) t->diskstart, (uint64_t) t->diskend - t->diskstart); aioWrite(cs->fd, t->diskstart, &(t->buffer[0]), COSS_MEMBUF_SZ, storeCossWriteMemBufDone, t, NULL); #else a_file_write(&cs->aq, cs->fd, t->diskstart, &t->buffer, @@ -930,7 +930,7 @@ cs->stripes[stripe].membuf = newmb; newmb->diskstart = start; newmb->stripe = stripe; - debug(79, 2) ("storeCossCreateMemBuf: %s: creating new membuf at stripe %d, %lld (%p)\n", SD->path, stripe, (long long int) newmb->diskstart, newmb); + debug(79, 2) ("storeCossCreateMemBuf: %s: creating new membuf at stripe %d, %" PRId64 " (%p)\n", SD->path, stripe, (int64_t) newmb->diskstart, newmb); newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ; newmb->flags.full = 0; newmb->flags.writing = 0; @@ -1087,10 +1087,10 @@ storeCossMemBufLockPending(pr, membuf); disk_offset = storeCossFilenoToDiskOffset(original_filen, cs); - debug(79, 3) ("COSS Pending Relocate: size %" PRINTF_OFF_T ", disk_offset %llu\n", (squid_off_t) sio->e->swap_file_sz, (long long int) disk_offset); + debug(79, 3) ("COSS Pending Relocate: size %" PRINTF_OFF_T ", disk_offset %" PRIu64 "\n", (squid_off_t) sio->e->swap_file_sz, (int64_t) disk_offset); #if USE_AUFSOPS /* NOTE: the damned buffer isn't passed into aioRead! */ - debug(79, 3) ("COSS: aioRead: FD %d, from %d -> %d, offset %llu, len: %ld\n", cs->fd, pr->original_filen, pr->new_filen, (long long int) disk_offset, (long int) pr->len); + debug(79, 3) ("COSS: aioRead: FD %d, from %d -> %d, offset %" PRIu64 ", len: %ld\n", cs->fd, pr->original_filen, pr->new_filen, (int64_t) disk_offset, (long int) pr->len); aioRead(cs->fd, (off_t) disk_offset, pr->len, storeCossCompletePendingReloc, pr); #else a_file_read(&cs->aq, cs->fd, @@ -1213,7 +1213,7 @@ /* Create entry */ op = memPoolAlloc(coss_op_pool); - debug(79, 3) ("COSS: Creating Read operation: %p: filen %d, offset %lld, size %lld\n", op, sio->swap_filen, (long long int) cstate->requestoffset, (long long int) cstate->requestlen); + debug(79, 3) ("COSS: Creating Read operation: %p: filen %d, offset %" PRId64 ", size %" PRId64 "\n", op, sio->swap_filen, (int64_t) cstate->requestoffset, (int64_t) cstate->requestlen); /* Fill in details */ op->type = COSS_OP_READ;