2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#ifndef _LIBC_LINT_H
2N/A#define _LIBC_LINT_H
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A/*
2N/A * We must include "lint.h" as the first #include in all libc source files
2N/A * for the purpose of running lint over libc, else lint errors occur due to
2N/A * lint not knowing the details of the implementation of locales and stdio.
2N/A */
2N/A#if defined(__lint)
2N/A
2N/A#include "mbstatet.h"
2N/A#include "file64.h"
2N/A
2N/A#else
2N/A
2N/A/*
2N/A * Small optimization for callers of syscall() and __systemcall().
2N/A * This could/should be defined elsewhere, but here is a particularly
2N/A * attractive place since all source files in libc include "lint.h".
2N/A */
2N/A#define syscall _syscall6
2N/A#define __systemcall __systemcall6
2N/A
2N/A/*
2N/A * Shades of the old and deprecated "synonyms.h" file.
2N/A * Because of the awkward relationship between these functions:
2N/A * memcmp()
2N/A * memcpy()
2N/A * memmove()
2N/A * memset()
2N/A * and the sparc auxiliary filters:
2N/A * /platform/.../lib/libc_psr.so.1
2N/A * we must be careful always to call the leading-underscore
2N/A * symbol names when calling from within libc itself.
2N/A *
2N/A * If an interposer interposes on these mem*() symbol names,
2N/A * and we call one of them from within a critical region in libc,
2N/A * we will end up in the interposer code while executing within
2N/A * the critical region. Chaos can ensue.
2N/A *
2N/A * We try to avoid this by calling only the leading-underscore names.
2N/A * We hope that no interposer will interpose on the leading-underscore
2N/A * versions of these functions, else all hope is lost.
2N/A */
2N/A
2N/A#pragma redefine_extname memcmp _memcmp
2N/A#pragma redefine_extname memcpy _memcpy
2N/A#pragma redefine_extname memmove _memmove
2N/A#pragma redefine_extname memset _memset
2N/A
2N/A#endif
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _LIBC_LINT_H */