This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2598 from ErnyTech/add-memmem
Add memmem to core.sys merged-on-behalf-of: Petar Kirov <ZombineDev@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
213 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* D header file for Bionic string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.bionic.string; | ||
|
||
public import core.stdc.string; | ||
|
||
version (CRuntime_Bionic): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* D header file for Darwin string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.darwin.string; | ||
|
||
public import core.stdc.string; | ||
import core.sys.darwin.sys.cdefs; | ||
|
||
version (OSX) | ||
version = Darwin; | ||
else version (iOS) | ||
version = Darwin; | ||
else version (TVOS) | ||
version = Darwin; | ||
else version (WatchOS) | ||
version = Darwin; | ||
|
||
version (Darwin): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
static if (__DARWIN_C_LEVEL >= __DARWIN_C_FULL) | ||
{ | ||
// ^ __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | ||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* D header file for DragonFlyBSD string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.dragonflybsd.string; | ||
|
||
public import core.stdc.string; | ||
import core.sys.dragonflybsd.sys.cdefs; | ||
|
||
version (DragonFlyBSD): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
static if (__BSD_VISIBLE) | ||
{ | ||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* D header file for FreeBSD string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.freebsd.string; | ||
|
||
public import core.stdc.string; | ||
import core.sys.freebsd.sys.cdefs; | ||
|
||
version (FreeBSD): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
static if (__BSD_VISIBLE) | ||
{ | ||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* D header file for Linux string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.linux.string; | ||
|
||
public import core.stdc.string; | ||
import core.sys.linux.config; | ||
|
||
version (linux): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
static if (__USE_GNU) | ||
{ | ||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* D header file for NetBSD string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.netbsd.string; | ||
|
||
public import core.stdc.string; | ||
import core.sys.netbsd.sys.featuretest; | ||
|
||
version (NetBSD): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
static if (_NETBSD_SOURCE) | ||
{ | ||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* D header file for NetBSD featuretest;. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.netbsd.sys.featuretest; | ||
|
||
version (NetBSD): | ||
|
||
enum _NETBSD_SOURCE = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* D header file for OpenBSD string. | ||
* | ||
* Copyright: Copyright © 2019, The D Language Foundation | ||
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>. | ||
* Authors: Ernesto Castellotti | ||
*/ | ||
module core.sys.openbsd.string; | ||
|
||
public import core.stdc.string; | ||
import core.sys.openbsd.sys.cdefs; | ||
|
||
version (OpenBSD): | ||
extern (C): | ||
nothrow: | ||
@nogc: | ||
|
||
static if (__BSD_VISIBLE) | ||
{ | ||
pure void* memmem(return const void* haystack, size_t haystacklen, scope const void* needle, size_t needlelen); | ||
} |