This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add probe for memrchr
authorH.Merijn Brand - Tux <h.m.brand@xs4all.nl>
Thu, 12 Oct 2017 16:01:35 +0000 (18:01 +0200)
committerH.Merijn Brand - Tux <h.m.brand@xs4all.nl>
Thu, 12 Oct 2017 16:01:35 +0000 (18:01 +0200)
U/perl/d_memrchr.U [new file with mode: 0644]

diff --git a/U/perl/d_memrchr.U b/U/perl/d_memrchr.U
new file mode 100644 (file)
index 0000000..f876282
--- /dev/null
@@ -0,0 +1,23 @@
+?RCS: You may distribute under the terms of either the GNU General Public
+?RCS: License or the Artistic License, as specified in the README file.
+?RCS:
+?MAKE:d_memrchr: Inlibc
+?MAKE: -pick add $@ %<
+?S:d_memrchr:
+?S:    This variable conditionally defines the HAS_MEMRCHR symbol, which
+?S:    indicates to the C program that the memrchr() routine is available
+?S:    to return a pointer to the start of the last occurrence of a
+?S:    substring in a memory area (or NULL if not found).
+?S:.
+?C:HAS_MEMRCHR:
+?C:    This symbol, if defined, indicates that the memrchr routine is
+?C:    available to return a pointer to the start of the last occurrence
+?C:    of a substring in a memory area (or NULL if not found).
+?C:.
+?H:#$d_memrchr HAS_MEMRCHR             /**/
+?H:.
+?LINT:set d_memrchr
+: see if memrchr exists
+set memrchr d_memrchr
+eval $inlibc
+