Replace COSMO define with _COSMO_SOURCE

This change might cause ABI breakages for /opt/cosmos. It's needed to
help us better conform to header declaration practices.
This commit is contained in:
Justine Tunney 2023-08-13 20:31:27 -07:00
parent a033b65a33
commit c776a32f75
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
238 changed files with 858 additions and 1069 deletions

View file

@ -149,7 +149,7 @@ void lua_readline_completions (const char *p, linenoiseCompletions *c) {
while (lua_next(L, -2)) {
if (lua_type(L, -2) == LUA_TSTRING) {
name = lua_tolstring(L, -2, &n);
if (_startswithi(name, a) && (s = malloc(a - p + n + 1))) {
if (startswithi(name, a) && (s = malloc(a - p + n + 1))) {
memcpy(s, p, a - p);
memcpy(s + (a - p), name, n + 1);
lua_readline_addcompletion(c, s);
@ -162,7 +162,7 @@ void lua_readline_completions (const char *p, linenoiseCompletions *c) {
lua_pop(L, 1); // pop table
for (i = 0; i < ARRAYLEN(kKeywordHints); ++i) {
if (_startswithi(kKeywordHints[i], p)) {
if (startswithi(kKeywordHints[i], p)) {
if ((s = strdup(kKeywordHints[i]))) {
lua_readline_addcompletion(c, s);
}