diff --git a/upnp/src/genlib/net/http/httpreadwrite.c b/upnp/src/genlib/net/http/httpreadwrite.c index 1b81b5b..b684f82 100644 --- a/upnp/src/genlib/net/http/httpreadwrite.c +++ b/upnp/src/genlib/net/http/httpreadwrite.c @@ -41,12 +41,14 @@ #include #ifndef UPNP_USE_BCBPP #ifndef UPNP_USE_MSVCPP + #include #include #endif #endif #ifndef WIN32 #include + #include #include #include #include @@ -54,7 +56,6 @@ #include #include #include - #include #else #include #include @@ -1908,7 +1909,7 @@ http_MakeMessage( INOUT membuffer * buf, { bignum = ( off_t )va_arg( argp, off_t ); - sprintf( tempbuf, "%lld", (int64_t)bignum ); + sprintf( tempbuf, "%"PRId64, (int64_t)bignum ); if( membuffer_append( buf, tempbuf, strlen( tempbuf ) ) != 0 ) { goto error_handler; } diff --git a/upnp/src/genlib/net/http/webserver.c b/upnp/src/genlib/net/http/webserver.c index 1e5f18b..fe04bac 100644 --- a/upnp/src/genlib/net/http/webserver.c +++ b/upnp/src/genlib/net/http/webserver.c @@ -39,7 +39,8 @@ #include #ifndef UPNP_USE_BCBPP #ifndef UPNP_USE_MSVCPP - #include + #include + #include #endif #endif #include "util.h" @@ -54,7 +55,7 @@ #include "ssdplib.h" #ifndef WIN32 - #include + #include #endif #include #include "ithread.h" @@ -990,7 +991,7 @@ CreateHTTPRangeResponseHeader( char *ByteRangeSpecifier, Instr->RangeOffset = FirstByte; Instr->ReadSendSize = LastByte - FirstByte + 1; sprintf( Instr->RangeHeader, - "CONTENT-RANGE: bytes %lld-%lld/%lld\r\n", + "CONTENT-RANGE: bytes %"PRId64"-%"PRId64"/%"PRId64"\r\n", (int64_t)FirstByte, (int64_t)LastByte, (int64_t)FileLength ); //Data between two range. @@ -999,7 +1000,7 @@ CreateHTTPRangeResponseHeader( char *ByteRangeSpecifier, Instr->RangeOffset = FirstByte; Instr->ReadSendSize = FileLength - FirstByte; sprintf( Instr->RangeHeader, - "CONTENT-RANGE: bytes %lld-%lld/%lld\r\n", + "CONTENT-RANGE: bytes %"PRId64"-%"PRId64"/%"PRId64"\r\n", (int64_t)FirstByte, (int64_t)(FileLength - 1), (int64_t)FileLength ); @@ -1008,14 +1009,14 @@ CreateHTTPRangeResponseHeader( char *ByteRangeSpecifier, Instr->RangeOffset = 0; Instr->ReadSendSize = FileLength; sprintf( Instr->RangeHeader, - "CONTENT-RANGE: bytes 0-%lld/%lld\r\n", + "CONTENT-RANGE: bytes 0-%"PRId64"/%"PRId64"\r\n", (int64_t)(FileLength - 1), (int64_t)FileLength ); } else { Instr->RangeOffset = FileLength - LastByte; Instr->ReadSendSize = LastByte; sprintf( Instr->RangeHeader, - "CONTENT-RANGE: bytes %lld-%lld/%lld\r\n", + "CONTENT-RANGE: bytes %"PRId64"-%"PRId64"/%"PRId64"\r\n", (int64_t)(FileLength - LastByte + 1), (int64_t)FileLength, (int64_t)FileLength );