summaryrefslogtreecommitdiff
path: root/libc/spec
diff options
context:
space:
mode:
authorAlex Brachet <abrachet@google.com>2023-01-11 05:38:33 +0000
committerAlex Brachet <abrachet@google.com>2023-01-11 05:38:33 +0000
commite9d571d3b6829f668e424d9dfce09f9ed7f297d9 (patch)
tree6c83db6dbdad46495432e6982adcc84d88367927 /libc/spec
parentfae63a9a227aa341c4410dbd9e4650844a2c8961 (diff)
downloadllvm-e9d571d3b6829f668e424d9dfce09f9ed7f297d9.tar.gz
[libc] Implement str{,n}casecmp
Differential Revision: https://reviews.llvm.org/D141236
Diffstat (limited to 'libc/spec')
-rw-r--r--libc/spec/bsd_ext.td20
1 files changed, 20 insertions, 0 deletions
diff --git a/libc/spec/bsd_ext.td b/libc/spec/bsd_ext.td
index 5779ab79c4f1..9ee07ce4e182 100644
--- a/libc/spec/bsd_ext.td
+++ b/libc/spec/bsd_ext.td
@@ -18,6 +18,25 @@ def BsdExtensions : StandardSpec<"BSDExtensions"> {
]
>;
+ HeaderSpec Strings = HeaderSpec<
+ "strings.h",
+ [], // Macros
+ [], // Types
+ [], // Enumerations
+ [
+ FunctionSpec<
+ "strcasecmp",
+ RetValSpec<IntType>,
+ [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>]
+ >,
+ FunctionSpec<
+ "strncasecmp",
+ RetValSpec<IntType>,
+ [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>, ArgSpec<SizeTType>]
+ >,
+ ]
+ >;
+
HeaderSpec SysWait = HeaderSpec<
"sys/wait.h",
[], // Macros
@@ -34,6 +53,7 @@ def BsdExtensions : StandardSpec<"BSDExtensions"> {
let Headers = [
String,
+ Strings,
SysWait,
];
}