summaryrefslogtreecommitdiff
path: root/graphics/libdrm/files/extra-tests_modetest_strchrnul.c
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@FreeBSD.org>2013-05-25 14:37:02 +0000
committerNiclas Zeising <zeising@FreeBSD.org>2013-05-25 14:37:02 +0000
commit92ea0d614b10bd99ce43a611721c7c4003cd79a5 (patch)
treecf13f962932aab3646f0af684b2923c4e0f0825b /graphics/libdrm/files/extra-tests_modetest_strchrnul.c
parent- Unbreak build when devel/libsysinfo is installed (diff)
The FreeBSD x11 team proudly presents
an zeising, kwm, miwi, bapt, eadler production: Xorg 7.7 Starring: xserver 1.12.4 (new xorg only) Mesa 8.0.4, including libGL, libGLU and dri (new xorg only) libX11 1.5.0 libxcb 1.9 libdrm 2.4.42 (new xorg only) freeglut 2.8.1 Also starring: Updates to drivers and other libraries and utilities Additional notes: Change pkgconf to be a build dependency. Add a new USE_XORG, xcb, to depend on libxcb and update all ports to use this. Trim makefile headers. Take maintanership of x11/xcb-proto, ok'd by ashish. If you are running WITH_NEW_XORG=, you need to rebuild all installed drivers, see UPDATING for more information. Various fixes to make ports compile. PR: ports/177942 Exp-run by: miwi Approved by: portmgr (miwi) Thanks to all who helped testing!
Notes
Notes: svn path=/head/; revision=319055
Diffstat (limited to 'graphics/libdrm/files/extra-tests_modetest_strchrnul.c')
-rw-r--r--graphics/libdrm/files/extra-tests_modetest_strchrnul.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/graphics/libdrm/files/extra-tests_modetest_strchrnul.c b/graphics/libdrm/files/extra-tests_modetest_strchrnul.c
new file mode 100644
index 000000000000..26ba9ac2e8b3
--- /dev/null
+++ b/graphics/libdrm/files/extra-tests_modetest_strchrnul.c
@@ -0,0 +1,48 @@
+--- tests/modetest/strchrnul.c.orig 2013-02-22 00:35:04.198698781 +0100
++++ tests/modetest/strchrnul.c 2013-02-22 00:34:36.280333357 +0100
+@@ -0,0 +1,45 @@
++/*-
++ * Copyright (c) 2013 Niclas Zeising
++ * All rights reserved.
++ *
++ * Redistribution and use in source and binary forms, with or without
++ * modification, are permitted provided that the following conditions
++ * are met:
++ * 1. Redistributions of source code must retain the above copyright
++ * notice, this list of conditions and the following disclaimer.
++ * 2. Redistributions in binary form must reproduce the above copyright
++ * notice, this list of conditions and the following disclaimer in the
++ * documentation and/or other materials provided with the distribution.
++ *
++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
++ * SUCH DAMAGE.
++ *
++ */
++
++/*
++ * Copied from:
++ * svn://svn.freebsd.org/base/head/lib/libc/string/strchrnul.c 246766 2013-02-13 15:46:33Z zeising
++ */
++
++char *
++strchrnul(const char *p, int ch)
++{
++ char c;
++
++ c = ch;
++ for (;; ++p) {
++ if (*p == c || *p == '\0')
++ return ((char *)p);
++ }
++ /* NOTREACHED */
++}
++