Changeset 528
- Timestamp:
- 12/20/06 01:04:47 (2 years ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/cget/main.c (modified) (1 diff)
- cherokee/trunk/cherokee/handler_admin.c (modified) (1 diff)
- cherokee/trunk/cherokee/handler_fastcgi.h (modified) (1 diff)
- cherokee/trunk/cherokee/handler_fcgi.h (modified) (1 diff)
- cherokee/trunk/cherokee/handler_scgi.c (modified) (1 diff)
- cherokee/trunk/cherokee/handler_scgi.h (modified) (1 diff)
- cherokee/trunk/cherokee/macros.h (modified) (3 diffs)
- cherokee/trunk/cherokee/post.c (modified) (2 diffs)
- cherokee/trunk/cherokee/post.h (modified) (2 diffs)
- cherokee/trunk/configure.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r527 r528 1 2006-12-19 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/handler_admin.c (cherokee_handler_admin_init): Fixed 4 post lenght type. 5 6 * cherokee/post.h, cherokee/post.c (cherokee_post_get_len, 7 cherokee_post_set_len): size_t -> off_t 8 9 * cherokee/handler_fastcgi.h, cherokee/handler_fcgi.h, 10 cherokee/handler_scgi.h, cherokee/handler_scgi.c (build_header): 11 post_len property should be off_t. Fixed and set the right 12 fomating string parameter. 13 14 * cherokee/post.h: size, received and walk_offset type are now 15 off_t rather than size_t. 16 17 * cherokee/macros.h (FMT_SIZE, FMT_SIZE_HEX, CST_SIZE): Added new 18 macros to defize the format string of a size_t value. 19 20 * configure.in: Added check for the size of size_t, int and 21 unsigned int. 22 1 23 2006-12-19 A.D.F <adefacc@tin.it> 2 24 cherokee/trunk/cget/main.c
r260 r528 261 261 do_download (cherokee_downloader_t *downloader, cherokee_fdpoll_t *fdpoll) 262 262 { 263 int num; 264 ret_t ret; 263 ret_t ret; 265 264 cherokee_downloader_status_t status; 266 intheaders_are_read = 0;267 int reading= 0;265 cint_t headers_are_read = 0; 266 cint_t reading = 0; 268 267 269 268 do_download__init(downloader,NULL); cherokee/trunk/cherokee/handler_admin.c
r476 r528 124 124 { 125 125 char *tmp; 126 size_tpostl;126 offset_t postl; 127 127 ret_t ret = ret_ok; 128 128 cherokee_buffer_t post = CHEROKEE_BUF_INIT; cherokee/trunk/cherokee/handler_fastcgi.h
r476 r528 64 64 cuchar_t generation; 65 65 cherokee_buffer_t write_buffer; 66 size_tpost_len;66 off_t post_len; 67 67 68 68 cherokee_fcgi_manager_t *manager; cherokee/trunk/cherokee/handler_fcgi.h
r526 r528 48 48 cherokee_socket_t socket; 49 49 cherokee_handler_fcgi_post_t post_phase; 50 size_tpost_len;50 off_t post_len; 51 51 cherokee_buffer_t write_buffer; 52 52 } cherokee_handler_fcgi_t; cherokee/trunk/cherokee/handler_scgi.c
r526 r528 240 240 char tmp[64]; 241 241 242 len = snprintf (tmp, 64, FMT_OFFSET, hdl->post_len);242 len = snprintf (tmp, sizeof(tmp), FMT_OFFSET, hdl->post_len); 243 243 244 244 set_env (HDL_CGI_BASE(hdl), "CONTENT_LENGTH", tmp, len); cherokee/trunk/cherokee/handler_scgi.h
r476 r528 47 47 cherokee_buffer_t header; 48 48 cherokee_socket_t socket; 49 size_tpost_len;49 off_t post_len; 50 50 } cherokee_handler_scgi_t; 51 51 cherokee/trunk/cherokee/macros.h
r489 r528 233 233 234 234 235 /* Format string for off_t 235 /* Format string for off_t and size_t 236 236 */ 237 237 #if (SIZEOF_OFF_T == SIZEOF_UNSIGNED_LONG_LONG) … … 239 239 # define FMT_OFFSET_HEX "%llx" 240 240 # define CST_OFFSET unsigned long long 241 #elif (SIZEOF_OFF_T == SIZEOF_UNSIGNED_LONG)241 #elif (SIZEOF_OFF_T == SIZEOF_UNSIGNED_LONG) 242 242 # define FMT_OFFSET "%lu" 243 243 # define FMT_OFFSET_HEX "%lx" … … 245 245 #else 246 246 # error Unknown size of off_t 247 #endif 248 249 #if (SIZEOF_SIZE_T == SIZEOF_UNSIGNED_INT) 250 # define FMT_SIZE "%d" 251 # define FMT_SIZE_HEX "%x" 252 # define CST_SIZE unsigned int 253 #elif (SIZEOF_SIZE_T == SIZEOF_UNSIGNED_LONG_LONG) 254 # define FMT_SIZE "%llu" 255 # define FMT_SIZE_HEX "%llx" 256 # define CST_SIZE unsigned long long 257 #else 258 # error Unknown size of size_t 247 259 #endif 248 260 cherokee/trunk/cherokee/post.c
r475 r528 75 75 76 76 ret_t 77 cherokee_post_set_len (cherokee_post_t *post, size_t len)77 cherokee_post_set_len (cherokee_post_t *post, offset_t len) 78 78 { 79 79 post->type = (len > POST_SIZE_TO_DISK) ? post_in_tmp_file : post_in_memory; … … 119 119 120 120 ret_t 121 cherokee_post_get_len (cherokee_post_t *post, size_t *len)121 cherokee_post_get_len (cherokee_post_t *post, offset_t *len) 122 122 { 123 123 *len = post->size; cherokee/trunk/cherokee/post.h
r256 r528 40 40 typedef struct { 41 41 cherokee_post_type_t type; 42 size_tsize;43 size_treceived;44 size_twalk_offset;42 off_t size; 43 off_t received; 44 off_t walk_offset; 45 45 46 46 cherokee_buffer_t info; … … 54 54 55 55 56 ret_t cherokee_post_init (cherokee_post_t *post);57 ret_t cherokee_post_mrproper (cherokee_post_t *post);56 ret_t cherokee_post_init (cherokee_post_t *post); 57 ret_t cherokee_post_mrproper (cherokee_post_t *post); 58 58 59 int cherokee_post_is_empty (cherokee_post_t *post);60 int cherokee_post_got_all (cherokee_post_t *post);59 int cherokee_post_is_empty (cherokee_post_t *post); 60 int cherokee_post_got_all (cherokee_post_t *post); 61 61 62 ret_t cherokee_post_set_len (cherokee_post_t *post, size_t len);63 ret_t cherokee_post_get_len (cherokee_post_t *post, size_t *len);62 ret_t cherokee_post_set_len (cherokee_post_t *post, offset_t len); 63 ret_t cherokee_post_get_len (cherokee_post_t *post, offset_t *len); 64 64 65 ret_t cherokee_post_append (cherokee_post_t *post, char *str, size_t len);66 ret_t cherokee_post_commit_buf (cherokee_post_t *post, size_t len);65 ret_t cherokee_post_append (cherokee_post_t *post, char *str, size_t len); 66 ret_t cherokee_post_commit_buf (cherokee_post_t *post, size_t len); 67 67 68 68 ret_t cherokee_post_walk_reset (cherokee_post_t *post); cherokee/trunk/configure.in
r522 r528 216 216 AC_TYPE_PID_T 217 217 AC_STRUCT_ST_RDEV 218 AC_CHECK_TYPE(ino_t, unsigned)219 AC_CHECK_TYPE(loff_t, off_t)220 AC_CHECK_TYPE(offset_t, loff_t)218 AC_CHECK_TYPE(ino_t, unsigned) 219 AC_CHECK_TYPE(loff_t, off_t) 220 AC_CHECK_TYPE(offset_t, loff_t) 221 221 AC_CHECK_TYPE(ssize_t, int) 222 222 AC_CHECK_TYPE(wchar_t, unsigned short) 223 223 224 AC_CHECK_SIZEOF(int) 225 AC_CHECK_SIZEOF(unsigned int) 224 226 AC_CHECK_SIZEOF(unsigned long) 225 227 AC_CHECK_SIZEOF(unsigned long long) 226 228 AC_CHECK_SIZEOF(unsigned int) 227 229 AC_CHECK_SIZEOF(off_t) 230 AC_CHECK_SIZEOF(size_t) 228 231 229 232 AC_CACHE_CHECK([for long long],samba_cv_have_longlong,[