From 20d7cd4c186bcbb50f0bb56ce882b5680664d965 Mon Sep 17 00:00:00 2001 From: Apple Date: Thu, 19 Jan 2006 20:21:03 +0000 Subject: [PATCH] Libc-391.2.5.tar.gz --- darwin/copyfile.c | 3 +++ gen/scalable_malloc.c | 7 +++++-- i386/sys/Makefile.inc | 1 - i386/sys/SYS.h | 2 +- i386/sys/semconfig.s | 29 ----------------------------- ppc/sys/Makefile.inc | 1 - ppc/sys/semconfig.s | 26 -------------------------- ppc64/sys/Makefile.inc | 1 - 8 files changed, 9 insertions(+), 61 deletions(-) delete mode 100644 i386/sys/semconfig.s delete mode 100644 ppc/sys/semconfig.s diff --git a/darwin/copyfile.c b/darwin/copyfile.c index bb28d55..4934f2b 100644 --- a/darwin/copyfile.c +++ b/darwin/copyfile.c @@ -143,6 +143,9 @@ int copyfile(const char *src, const char *dst, copyfile_state_t state, copyfile_ } } else if (COPYFILE_UNPACK & flags) { + if (!(COPYFILE_STAT & flags || COPYFILE_ACL & flags)) + fix_perms = !copyfile_fix_perms(s, &original_fsec, 1); + if (copyfile_unpack(s) < 0) ret = -1; } else diff --git a/gen/scalable_malloc.c b/gen/scalable_malloc.c index b47e48e..386aab4 100644 --- a/gen/scalable_malloc.c +++ b/gen/scalable_malloc.c @@ -603,7 +603,7 @@ allocate_pages(szone_t *szone, size_t size, unsigned char align, unsigned debug_ boolean_t add_guard_pages = debug_flags & SCALABLE_MALLOC_ADD_GUARD_PAGES; size_t allocation_size = round_page(size); size_t delta; - + if (align) add_guard_pages = 0; // too cumbersome to deal with that if (!allocation_size) allocation_size = 1 << vm_page_shift; if (add_guard_pages) allocation_size += 2 * (1 << vm_page_shift); @@ -3075,7 +3075,10 @@ szone_malloc_should_clear(szone_t *szone, size_t size, boolean_t cleared_request } else { // large or huge num_pages = round_page(size) >> vm_page_shift; - ptr = large_and_huge_malloc(szone, num_pages); + if (num_pages == 0) /* Overflowed */ + ptr = 0; + else + ptr = large_and_huge_malloc(szone, num_pages); } #if DEBUG_MALLOC if (LOG(szone, ptr)) diff --git a/i386/sys/Makefile.inc b/i386/sys/Makefile.inc index c0dcbf4..9535aa1 100644 --- a/i386/sys/Makefile.inc +++ b/i386/sys/Makefile.inc @@ -161,7 +161,6 @@ MDSRCS+= ATPgetreq.s \ sem_post.s \ sem_trywait.s \ sem_wait.s \ - semconfig.s \ semget.s \ semop.s \ semsys.s \ diff --git a/i386/sys/SYS.h b/i386/sys/SYS.h index 1212eb0..83ac264 100644 --- a/i386/sys/SYS.h +++ b/i386/sys/SYS.h @@ -90,7 +90,7 @@ LEAF(_##pseudo, 0) ;\ #define SYS_semctl 254 #define SYS_semget 255 #define SYS_semop 256 -#define SYS_semconfig 257 +/*#define SYS_semconfig 257*/ #define SYS_msgctl 258 #define SYS_msgget 259 #define SYS_msgsnd 260 diff --git a/i386/sys/semconfig.s b/i386/sys/semconfig.s deleted file mode 100644 index c1dbeba..0000000 --- a/i386/sys/semconfig.s +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved - */ -#include "SYS.h" - -UNIX_SYSCALL(semconfig, 3) - ret diff --git a/ppc/sys/Makefile.inc b/ppc/sys/Makefile.inc index c421697..36b80fb 100644 --- a/ppc/sys/Makefile.inc +++ b/ppc/sys/Makefile.inc @@ -165,7 +165,6 @@ MDSRCS+= ATPgetreq.s \ sem_post.s \ sem_trywait.s \ sem_wait.s \ - semconfig.s \ semget.s \ semop.s \ semsys.s \ diff --git a/ppc/sys/semconfig.s b/ppc/sys/semconfig.s deleted file mode 100644 index 3ea04d7..0000000 --- a/ppc/sys/semconfig.s +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -#include "SYS.h" - -SYSCALL(semconfig, 3) - diff --git a/ppc64/sys/Makefile.inc b/ppc64/sys/Makefile.inc index 4589423..edd7fe7 100644 --- a/ppc64/sys/Makefile.inc +++ b/ppc64/sys/Makefile.inc @@ -168,7 +168,6 @@ MDSRCS+= ATPgetreq.s \ sem_post.s \ sem_trywait.s \ sem_wait.s \ - semconfig.s \ semctl.s \ semget.s \ semop.s \ -- 2.47.2