1# 2# SPDX-License-Identifier: BSD-3-Clause 3# 4# Copyright © 2019 Keith Packard 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: 9# 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 13# 2. Redistributions in binary form must reproduce the above 14# copyright notice, this list of conditions and the following 15# disclaimer in the documentation and/or other materials provided 16# with the distribution. 17# 18# 3. Neither the name of the copyright holder nor the names of its 19# contributors may be used to endorse or promote products derived 20# from this software without specific prior written permission. 21# 22# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 23# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 24# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 25# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 26# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 27# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 29# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 31# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 33# OF THE POSSIBILITY OF SUCH DAMAGE. 34# 35srcs_ctype = [ 36 'categories.c', 37 'ctype_.c', 38 'isalnum.c', 39 'isalnum_l.c', 40 'isalpha.c', 41 'isalpha_l.c', 42 'isascii.c', 43 'isascii_l.c', 44 'isblank.c', 45 'isblank_l.c', 46 'iscntrl.c', 47 'iscntrl_l.c', 48 'isdigit.c', 49 'isdigit_l.c', 50 'islower.c', 51 'islower_l.c', 52 'isprint.c', 53 'isprint_l.c', 54 'ispunct.c', 55 'ispunct_l.c', 56 'isspace.c', 57 'isspace_l.c', 58 'isupper.c', 59 'isupper_l.c', 60 'iswalnum.c', 61 'iswalnum_l.c', 62 'iswalpha.c', 63 'iswalpha_l.c', 64 'iswblank.c', 65 'iswblank_l.c', 66 'iswcntrl.c', 67 'iswcntrl_l.c', 68 'iswctype.c', 69 'iswctype_l.c', 70 'iswdigit.c', 71 'iswdigit_l.c', 72 'iswgraph.c', 73 'iswgraph_l.c', 74 'iswlower.c', 75 'iswlower_l.c', 76 'iswprint.c', 77 'iswprint_l.c', 78 'iswpunct.c', 79 'iswpunct_l.c', 80 'iswspace.c', 81 'iswspace_l.c', 82 'iswupper.c', 83 'iswupper_l.c', 84 'iswxdigit.c', 85 'iswxdigit_l.c', 86 'isxdigit.c', 87 'isxdigit_l.c', 88 'jp2uc.c', 89 'toascii.c', 90 'toascii_l.c', 91 'tolower.c', 92 'tolower_l.c', 93 'toupper.c', 94 'toupper_l.c', 95 'towctrans.c', 96 'towctrans_l.c', 97 'towlower.c', 98 'towlower_l.c', 99 'towupper.c', 100 'towupper_l.c', 101 'wctrans.c', 102 'wctrans_l.c', 103 'wctype.c', 104 'wctype_l.c', 105] 106hdrs_ctype = [ 107 'categories.h', 108 'ctype_cp.h', 109 'ctype_.h', 110 'ctype_iso.h', 111 'jp2uc.h', 112 'local.h', 113] 114 115srcs_ctype_use = [] 116foreach file : srcs_ctype 117 s_file = fs.replace_suffix(file, '.S') 118 if file in srcs_machine 119 message('libc/ctype/' + file + ': machine overrides generic') 120 elif s_file in srcs_machine 121 message('libc/ctype/' + s_file + ': machine overrides generic') 122 else 123 srcs_ctype_use += file 124 endif 125endforeach 126 127src_ctype = files(srcs_ctype_use) 128