[Dist-svn] SF.net SVN: dist:[200] trunk/dist
Brought to you by:
rmanfredi
From: <rma...@us...> - 2015-12-03 22:16:09
|
Revision: 200 http://sourceforge.net/p/dist/code/200 Author: rmanfredi Date: 2015-12-03 22:16:07 +0000 (Thu, 03 Dec 2015) Log Message: ----------- Added check for bsearch(). Modified Paths: -------------- trunk/dist/MANIFEST Added Paths: ----------- trunk/dist/mcon/U/d_bsearch.U Modified: trunk/dist/MANIFEST =================================================================== --- trunk/dist/MANIFEST 2015-11-27 23:00:07 UTC (rev 199) +++ trunk/dist/MANIFEST 2015-12-03 22:16:07 UTC (rev 200) @@ -173,6 +173,7 @@ mcon/U/d_bindtxtcode.U Do we have bind_textdomain_codeset()? mcon/U/d_brokstat.U Check whether stat() macros are broken mcon/U/d_bsdjmp.U Do we have BSD _setjmp() and _longjmp()? +mcon/U/d_bsearch.U Do we have bsearch()? mcon/U/d_built_bswap32.U Is __builtin_bswap32() available? mcon/U/d_built_bswap64.U Is __builtin_bswap64() available? mcon/U/d_built_clz.U Is __builtin_clz() available? Added: trunk/dist/mcon/U/d_bsearch.U =================================================================== --- trunk/dist/mcon/U/d_bsearch.U (rev 0) +++ trunk/dist/mcon/U/d_bsearch.U 2015-12-03 22:16:07 UTC (rev 200) @@ -0,0 +1,39 @@ +?RCS: +?RCS: Copyright (c) 2015 Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic License, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic License; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?MAKE:d_bsearch: Trylink cat +?MAKE: -pick add $@ %< +?S:d_bsearch: +?S: This variable conditionally defines the HAS_BSEARCH symbol, which +?S: indicates to the C program that it can use the bsearch() routine +?S: to perform a binary search on a sorted array. +?S:. +?C:HAS_BSEARCH: +?C: This symbol, if defined, indicates that the bsearch() routine +?C: is available to perform a binary search on a sorted array. +?C:. +?H:#$d_bsearch HAS_BSEARCH /**/ +?H:. +?LINT:set d_bsearch +: see if there is a bsearch +$cat >try.c <<EOC +#include <stdlib.h> +int mycmp(const void *a, const void *b) +{ + return (char *) a - (char *) b; +} +int main(int argc, char **argv) +{ + return NULL == bsearch("foo", argv, argc, sizeof argv[0], mycmp); +} +EOC +cyn=bsearch +set d_bsearch +eval $trylink + Property changes on: trunk/dist/mcon/U/d_bsearch.U ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +Author Date Id Revision \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |