1*9e66e6d7Sabs /* $NetBSD: strsignal.c,v 1.15 2012/06/25 22:32:46 abs Exp $ */
23d2267c8Schristos
318ba4287Sjtc /*
418ba4287Sjtc * Copyright (c) 1988 Regents of the University of California.
518ba4287Sjtc * All rights reserved.
618ba4287Sjtc *
718ba4287Sjtc * Redistribution and use in source and binary forms, with or without
818ba4287Sjtc * modification, are permitted provided that the following conditions
918ba4287Sjtc * are met:
1018ba4287Sjtc * 1. Redistributions of source code must retain the above copyright
1118ba4287Sjtc * notice, this list of conditions and the following disclaimer.
1218ba4287Sjtc * 2. Redistributions in binary form must reproduce the above copyright
1318ba4287Sjtc * notice, this list of conditions and the following disclaimer in the
1418ba4287Sjtc * documentation and/or other materials provided with the distribution.
15eb7c1594Sagc * 3. Neither the name of the University nor the names of its contributors
1618ba4287Sjtc * may be used to endorse or promote products derived from this software
1718ba4287Sjtc * without specific prior written permission.
1818ba4287Sjtc *
1918ba4287Sjtc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2018ba4287Sjtc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2118ba4287Sjtc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2218ba4287Sjtc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2318ba4287Sjtc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2418ba4287Sjtc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2518ba4287Sjtc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2618ba4287Sjtc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2718ba4287Sjtc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2818ba4287Sjtc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2918ba4287Sjtc * SUCH DAMAGE.
3018ba4287Sjtc */
3118ba4287Sjtc
323d2267c8Schristos #include <sys/cdefs.h>
3318ba4287Sjtc #if defined(LIBC_SCCS) && !defined(lint)
343d2267c8Schristos #if 0
353d2267c8Schristos static char *sccsid = "@(#)strerror.c 5.6 (Berkeley) 5/4/91";
363d2267c8Schristos #else
37*9e66e6d7Sabs __RCSID("$NetBSD: strsignal.c,v 1.15 2012/06/25 22:32:46 abs Exp $");
383d2267c8Schristos #endif
3918ba4287Sjtc #endif /* LIBC_SCCS and not lint */
4018ba4287Sjtc
4143fa6fe3Sjtc #include "namespace.h"
429be46036Skleink #include <string.h>
43d9c2e7b5Sjtc #include <limits.h>
443d2267c8Schristos #include "extern.h"
4518ba4287Sjtc
4643fa6fe3Sjtc #ifdef __weak_alias
__weak_alias(strsignal,_strsignal)4760549036Smycroft __weak_alias(strsignal,_strsignal)
4843fa6fe3Sjtc #endif
4943fa6fe3Sjtc
50131e7470Smycroft __aconst char *
51*9e66e6d7Sabs strsignal(int sig)
5218ba4287Sjtc {
53d9c2e7b5Sjtc static char buf[NL_TEXTMAX];
549cd5492cSmrg
5503256c6eSchristos return __UNCONST(__strsignal(sig, buf, NL_TEXTMAX));
5618ba4287Sjtc }
57