From owner-svn-src-head@FreeBSD.ORG Mon Sep 1 22:25:43 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4F464869; Mon, 1 Sep 2014 22:25:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 212F61AE2; Mon, 1 Sep 2014 22:25:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s81MPg4X004845; Mon, 1 Sep 2014 22:25:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s81MPg8l004843; Mon, 1 Sep 2014 22:25:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201409012225.s81MPg8l004843@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 1 Sep 2014 22:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r270952 - in head: include lib/libc/stdlib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Sep 2014 22:25:43 -0000 Author: pfg Date: Mon Sep 1 22:25:42 2014 New Revision: 270952 URL: http://svnweb.freebsd.org/changeset/base/270952 Log: Add bsearch_b to the libc map and the stdlib header. bsearch_b is the Apple blocks enabled version of bsearch(3). This was added to libc in Revision 264042 but the commit missed the declaration required to make use of it. While here move some other block-related functions to the BSD_VISIBLE block as these are non-standard. Phabric: D638 Reviewed by: theraven, wollman Modified: head/include/stdlib.h head/lib/libc/stdlib/Symbol.map Modified: head/include/stdlib.h ============================================================================== --- head/include/stdlib.h Mon Sep 1 20:18:09 2014 (r270951) +++ head/include/stdlib.h Mon Sep 1 22:25:42 2014 (r270952) @@ -82,9 +82,6 @@ extern int ___mb_cur_max(void); _Noreturn void abort(void); int abs(int) __pure2; int atexit(void (*)(void)); -#ifdef __BLOCKS__ -int atexit_b(void (^)(void)); -#endif double atof(const char *); int atoi(const char *); long atol(const char *); @@ -103,10 +100,6 @@ size_t mbstowcs(wchar_t * __restrict , int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); void qsort(void *, size_t, size_t, int (*)(const void *, const void *)); -#ifdef __BLOCKS__ -void qsort_b(void *, size_t, size_t, - int (^)(const void *, const void *)); -#endif int rand(void); void *realloc(void *, size_t); void srand(unsigned); @@ -264,6 +257,11 @@ void arc4random_buf(void *, size_t); void arc4random_stir(void); __uint32_t arc4random_uniform(__uint32_t); +#ifdef __BLOCKS__ +int atexit_b(void (^)(void)); +void *bsearch_b(const void *, const void *, size_t, + size_t, int (^)(const void *, const void *)); +#endif char *getbsize(int *, long *); /* getcap(3) functions */ char *cgetcap(char *, const char *, int); @@ -289,6 +287,8 @@ const char * int heapsort(void *, size_t, size_t, int (*)(const void *, const void *)); #ifdef __BLOCKS__ int heapsort_b(void *, size_t, size_t, int (^)(const void *, const void *)); +void qsort_b(void *, size_t, size_t, + int (^)(const void *, const void *)); #endif int l64a_r(long, char *, int); int mergesort(void *, size_t, size_t, int (*)(const void *, const void *)); Modified: head/lib/libc/stdlib/Symbol.map ============================================================================== --- head/lib/libc/stdlib/Symbol.map Mon Sep 1 20:18:09 2014 (r270951) +++ head/lib/libc/stdlib/Symbol.map Mon Sep 1 22:25:42 2014 (r270952) @@ -106,6 +106,7 @@ FBSD_1.3 { FBSD_1.4 { atexit_b; + bsearch_b; heapsort_b; mergesort_b; qsort_b;