Date: 02/27/99
- Next message: sas <email protected>: "Re: [PHP-DEV] PHP3 and 64-bit land"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] PHP3 and 64-bit land"
- Next in thread: sas: "[PHP-DEV] CVS update: php3"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Saturday February 27, 1999 @ 11:38
Author: sas
Update of /repository/php3
In directory asf:/u/temp/cvs-serv24946
Modified Files:
alloc.c
Log Message:
make the compiler happy
Index: php3/alloc.c
diff -c php3/alloc.c:1.79 php3/alloc.c:1.80
*** php3/alloc.c:1.79 Sat Feb 27 09:18:20 1999
--- php3/alloc.c Sat Feb 27 11:38:56 1999
***************
*** 96,102 ****
#if DEBUG
if (!(initialized & INIT_MEMORY_MANAGER)) {
! fprintf(stderr,"WARNING: Call to emalloc() before memory manager is started from %s:%d (%d bytes)\n",filename,lineno,size);
}
#endif
--- 96,102 ----
#if DEBUG
if (!(initialized & INIT_MEMORY_MANAGER)) {
! fprintf(stderr,"WARNING: Call to emalloc() before memory manager is started from %s:%u (%ul bytes)\n",filename,lineno, size);
}
#endif
***************
*** 116,122 ****
}
if (!p) {
! fprintf(stderr,"FATAL: emalloc(): Unable to allocate %d bytes\n", size);
exit(1);
UNBLOCK_INTERRUPTIONS;
return (void *)p;
--- 116,122 ----
}
if (!p) {
! fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ul bytes\n", size);
exit(1);
UNBLOCK_INTERRUPTIONS;
return (void *)p;
***************
*** 195,201 ****
UNBLOCK_INTERRUPTIONS;
return (void *) p;
}
! memset(p,(int)NULL,final_size);
UNBLOCK_INTERRUPTIONS;
return p;
}
--- 195,201 ----
UNBLOCK_INTERRUPTIONS;
return (void *) p;
}
! memset(p,0,final_size);
UNBLOCK_INTERRUPTIONS;
return p;
}
***************
*** 222,228 ****
REMOVE_POINTER_FROM_LIST(p);
p = (mem_header *) realloc(p,sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
if (!p) {
! fprintf(stderr,"FATAL: erealloc(): Unable to allocate %d bytes\n", size);
exit(1);
orig->pNext = GLOBAL(head);
if (GLOBAL(head)) {
--- 222,228 ----
REMOVE_POINTER_FROM_LIST(p);
p = (mem_header *) realloc(p,sizeof(mem_header)+size+PLATFORM_PADDING+END_ALIGNMENT(size)+END_MAGIC_SIZE);
if (!p) {
! fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ul bytes\n", size);
exit(1);
orig->pNext = GLOBAL(head);
if (GLOBAL(head)) {
***************
*** 433,439 ****
} else {
return _mem_block_check(ptr, 0, filename, lineno);
}
! had_problems;
valid_beginning=0;
break;
}
--- 433,439 ----
} else {
return _mem_block_check(ptr, 0, filename, lineno);
}
! had_problems=1;
valid_beginning=0;
break;
}
***************
*** 463,469 ****
*((long *)(((char *) p) + sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
fprintf(stderr,"%10s\t","");
if (overflows>=sizeof(long)) {
! fprintf(stderr, "At least %d bytes overflown\n", sizeof(long));
} else {
fprintf(stderr, "%d byte(s) overflown\n", overflows);
}
--- 463,469 ----
*((long *)(((char *) p) + sizeof(mem_header)+p->size+PLATFORM_PADDING+END_ALIGNMENT(p->size))), MEM_BLOCK_END_MAGIC);
fprintf(stderr,"%10s\t","");
if (overflows>=sizeof(long)) {
! fprintf(stderr, "At least %ld bytes overflown\n", sizeof(long));
} else {
fprintf(stderr, "%d byte(s) overflown\n", overflows);
}
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: sas <email protected>: "Re: [PHP-DEV] PHP3 and 64-bit land"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] PHP3 and 64-bit land"
- Next in thread: sas: "[PHP-DEV] CVS update: php3"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

