1f7e6344dSDag-Erling Smørgrav /*- 2f7e6344dSDag-Erling Smørgrav * Copyright (c) 2011 Dag-Erling Smørgrav 3f7e6344dSDag-Erling Smørgrav * All rights reserved. 4f7e6344dSDag-Erling Smørgrav * 5f7e6344dSDag-Erling Smørgrav * Redistribution and use in source and binary forms, with or without 6f7e6344dSDag-Erling Smørgrav * modification, are permitted provided that the following conditions 7f7e6344dSDag-Erling Smørgrav * are met: 8f7e6344dSDag-Erling Smørgrav * 1. Redistributions of source code must retain the above copyright 9*ce77a8d6SDag-Erling Smørgrav * notice, this list of conditions and the following disclaimer. 10f7e6344dSDag-Erling Smørgrav * 2. Redistributions in binary form must reproduce the above copyright 11f7e6344dSDag-Erling Smørgrav * notice, this list of conditions and the following disclaimer in the 12f7e6344dSDag-Erling Smørgrav * documentation and/or other materials provided with the distribution. 13f7e6344dSDag-Erling Smørgrav * 3. The name of the author may not be used to endorse or promote 14f7e6344dSDag-Erling Smørgrav * products derived from this software without specific prior written 15f7e6344dSDag-Erling Smørgrav * permission. 16f7e6344dSDag-Erling Smørgrav * 17f7e6344dSDag-Erling Smørgrav * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18f7e6344dSDag-Erling Smørgrav * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19f7e6344dSDag-Erling Smørgrav * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20f7e6344dSDag-Erling Smørgrav * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21f7e6344dSDag-Erling Smørgrav * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22f7e6344dSDag-Erling Smørgrav * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23f7e6344dSDag-Erling Smørgrav * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24f7e6344dSDag-Erling Smørgrav * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25f7e6344dSDag-Erling Smørgrav * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26f7e6344dSDag-Erling Smørgrav * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27f7e6344dSDag-Erling Smørgrav * SUCH DAMAGE. 28f7e6344dSDag-Erling Smørgrav */ 29f7e6344dSDag-Erling Smørgrav 30f7e6344dSDag-Erling Smørgrav #ifndef OPENPAM_STRLCPY_H_INCLUDED 31f7e6344dSDag-Erling Smørgrav #define OPENPAM_STRLCPY_H_INCLUDED 32f7e6344dSDag-Erling Smørgrav 33f7e6344dSDag-Erling Smørgrav #ifndef HAVE_STRLCPY 34*ce77a8d6SDag-Erling Smørgrav size_t openpam_strlcpy(char *, const char *, size_t); 35*ce77a8d6SDag-Erling Smørgrav #undef strlcpy 36*ce77a8d6SDag-Erling Smørgrav #define strlcpy(arg, ...) openpam_strlcpy(arg, __VA_ARGS__) 37f7e6344dSDag-Erling Smørgrav #endif 38f7e6344dSDag-Erling Smørgrav 39f7e6344dSDag-Erling Smørgrav #endif 40