Changeset 10718
- Timestamp:
- Sep 12, 2008, 6:07:13 AM (12 years ago)
- Location:
- trunk/source/lisp-kernel
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/lisp-kernel/image.c
r10565 r10718 93 93 seek_to_next_page(int fd) 94 94 { 95 off_t pos = lseek(fd, 0, SEEK_CUR);95 off_t pos = LSEEK(fd, 0, SEEK_CUR); 96 96 pos = align_to_power_of_2(pos, log2_page_size); 97 return lseek(fd, pos, SEEK_SET);97 return LSEEK(fd, pos, SEEK_SET); 98 98 } 99 99 … … 111 111 unsigned version, flags; 112 112 113 pos = lseek(fd, 0, SEEK_END);113 pos = LSEEK(fd, 0, SEEK_END); 114 114 if (pos < 0) { 115 115 return false; … … 117 117 pos -= sizeof(trailer); 118 118 119 if ( lseek(fd, pos, SEEK_SET) < 0) {119 if (LSEEK(fd, pos, SEEK_SET) < 0) { 120 120 return false; 121 121 } … … 133 133 return false; 134 134 } 135 if ( lseek(fd, disp, SEEK_CUR) < 0) {135 if (LSEEK(fd, disp, SEEK_CUR) < 0) { 136 136 return false; 137 137 } … … 227 227 228 228 } 229 lseek(fd, pos+advance, SEEK_SET);229 LSEEK(fd, pos+advance, SEEK_SET); 230 230 } 231 231 … … 249 249 } 250 250 #if WORD_SIZE == 64 251 lseek(fd, section_data_delta, SEEK_CUR);251 LSEEK(fd, section_data_delta, SEEK_CUR); 252 252 #endif 253 253 for (i = 0; i < nsections; i++, sect++) { … … 380 380 *header_pos = seek_to_next_page(fd); 381 381 382 if ( lseek(fd, *header_pos, SEEK_SET) < 0) {382 if (LSEEK (fd, *header_pos, SEEK_SET) < 0) { 383 383 return errno; 384 384 } … … 497 497 #if WORD_SIZE == 64 498 498 seek_to_next_page(fd); 499 section_data_delta = -(( lseek(fd,0,SEEK_CUR)+sizeof(fh)+sizeof(sections)) -499 section_data_delta = -((LSEEK(fd,0,SEEK_CUR)+sizeof(fh)+sizeof(sections)) - 500 500 image_data_pos); 501 501 fh.section_data_offset_high = (int)(section_data_delta>>32L); … … 510 510 trailer.sig1 = IMAGE_SIG1; 511 511 trailer.sig2 = IMAGE_SIG2; 512 eof_pos = lseek(fd, 0, SEEK_CUR) + sizeof(trailer);512 eof_pos = LSEEK(fd, 0, SEEK_CUR) + sizeof(trailer); 513 513 trailer.delta = (int) (header_pos-eof_pos); 514 514 if (write(fd, &trailer, sizeof(trailer)) == sizeof(trailer)) { -
trunk/source/lisp-kernel/macros.h
r10093 r10718 91 91 (((signed_natural *)((tcr)->tlb_pointer))[INTERRUPT_LEVEL_BINDING_INDEX]) 92 92 #endif 93 94 #ifdef WINDOWS 95 #define LSEEK(fd,offset,how) _lseeki64(fd,offset,how) 96 #else 97 #define LSEEK(fd,offset,how) lseek(fd,offset,how) 98 #endif -
trunk/source/lisp-kernel/memory.c
r10565 r10718 391 391 size_t opos; 392 392 393 opos = lseek(fd, 0, SEEK_CUR);393 opos = LSEEK(fd, 0, SEEK_CUR); 394 394 CommitMemory(addr, nbytes); 395 lseek(fd, pos, SEEK_SET);395 LSEEK(fd, pos, SEEK_SET); 396 396 397 397 while (total < nbytes) { … … 403 403 } 404 404 405 lseek(fd, opos, SEEK_SET);405 LSEEK(fd, opos, SEEK_SET); 406 406 407 407 return true;
Note: See TracChangeset
for help on using the changeset viewer.