Merge branch 'vendor/LIBPCAP'
[dragonfly.git] / lib / libc / gen / dlerror.3
1 .\" This source code is a product of Sun Microsystems, Inc. and is provided
2 .\" for unrestricted use provided that this legend is included on all tape
3 .\" media and as a part of the software program in whole or part.  Users
4 .\" may copy or modify this source code without charge, but are not authorized
5 .\" to license or distribute it to anyone else except as part of a product or
6 .\" program developed by the user.
7 .\"
8 .\" THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
9 .\" SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
10 .\" OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
11 .\" EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
12 .\" ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
13 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
14 .\" NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
15 .\" INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
16 .\" FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
17 .\"
18 .\" This source code is provided with no support and without any obligation on
19 .\" the part of Sun Microsystems, Inc. to assist in its use, correction,
20 .\" modification or enhancement.
21 .\"
22 .\" SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
23 .\" INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
24 .\" SOURCE CODE OR ANY PART THEREOF.
25 .\"
26 .\" Sun Microsystems, Inc.
27 .\" 2550 Garcia Avenue
28 .\" Mountain View, California 94043
29 .\"
30 .\" Copyright (c) 1991 Sun Microsystems, Inc.
31 .\"
32 .\" $FreeBSD: release/8.1.0/lib/libc/gen/dlopen.3 205979 2010-03-31 13:51:31Z gahr $
33 .\"
34 .Dd April 28, 2011
35 .Dt DLERROR 3
36 .Os
37 .Sh NAME
38 .Nm dlerror
39 .Nd retrieve dynamic linker error messages
40 .Sh LIBRARY
41 This function is not in a library.
42 It is included in every dynamically linked program automatically.
43 .Sh SYNOPSIS
44 .In dlfcn.h
45 .Ft char *
46 .Fn dlerror "void"
47 .Sh DESCRIPTION
48 The
49 .Fn dlerror
50 function
51 returns a null-terminated character string describing the last error that
52 occurred during a call to
53 .Fn dlopen ,
54 .Fn dladdr ,
55 .Fn dlinfo ,
56 .Fn dlsym ,
57 .Fn dlvsym ,
58 or
59 .Fn dlclose .
60 If no such error has occurred,
61 .Fn dlerror
62 returns a null pointer.
63 At each call to
64 .Fn dlerror ,
65 the error indication is reset.
66 Thus in the case of two calls
67 to
68 .Fn dlerror ,
69 where the second call follows the first immediately, the second call
70 will always return a null pointer.
71 .Sh SEE ALSO
72 .Xr rtld 1 ,
73 .Xr dlclose 3 ,
74 .Xr dlfcn 3 ,
75 .Xr dlopen 3 ,
76 .Xr dlsym 3 ,
77 .Xr dlvsym 3