OpenJPIP: small bug fixes to compile on win platform

This commit is contained in:
Antonin Descampe 2011-05-09 09:27:48 +00:00
parent 1dc2654b54
commit fb29d47f0c
5 changed files with 15 additions and 6 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
May 9, 2011
* [antonin] OpenJPIP: small bug fixes to compile on win platform
May 8, 2011
* [antonin] OpenJPIP: fixed several bugs in opj_server (removal of strsep function, duplication of query string) + some changes to compile opj_server under windows (replacement of strcasecmp(), bzero()).

View File

@ -207,7 +207,7 @@ void send_PNMstream( int connected_socket, Byte_t *pnmstream, unsigned int width
void send_stream( int connected_socket, void *stream, int length)
{
void *ptr = stream;
Byte_t *ptr = (Byte_t*)stream;
int remlen = length;
while( remlen > 0){

View File

@ -130,7 +130,7 @@ int main(int argc, char *argv[]){
bool quit = false;
int listening_socket = open_listeningsocket();
int addrlen = sizeof(peer_sin);
socklen_t addrlen = sizeof(peer_sin);
cachelist_param_t *cachelist = gene_cachelist();

View File

@ -31,7 +31,13 @@
#ifndef QUERY_PARSER_H_
# define QUERY_PARSER_H_
#ifdef _WIN32
#define bool int
#define true 1
#define false 0
#else
#include <stdbool.h>
#endif
//! maximum length of target name
#define MAX_LENOFTARGET 128

View File

@ -1017,7 +1017,7 @@ void j2k_read_unk() {
int j2k_index_JPIP(char *Idx_file, char *J2K_file, int len, int version){
FILE *dest;
char *index;
unsigned char *index;
int pos_iptr, end_pos;
int len_cidx, pos_cidx;
int len_jp2c, pos_jp2c;
@ -1030,7 +1030,7 @@ int j2k_index_JPIP(char *Idx_file, char *J2K_file, int len, int version){
}
/* INDEX MODE JPIP */
index = (char*)malloc(len);
index = (unsigned char*)malloc(len);
cio_init(index, len);
jp2_write_jp();
jp2_write_ftyp();
@ -1158,7 +1158,7 @@ int main(int argc, char **argv)
{
FILE *src;
int totlen;
char *j2kfile;
unsigned char *j2kfile;
j2k_image_t *imgg;
j2k_cp_t *cp;
int version;
@ -1180,7 +1180,7 @@ int main(int argc, char **argv)
totlen = ftell(src);
fseek(src, 0, SEEK_SET);
j2kfile = (char*)malloc(totlen);
j2kfile = (unsigned char*)malloc(totlen);
fread(j2kfile, 1, totlen, src);
fclose(src);