From nobody  Sat Dec  6 15:50:19 1997
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.7/8.8.7) id PAA25451;
          Sat, 6 Dec 1997 15:50:19 -0800 (PST)
          (envelope-from nobody)
Message-Id: <199712062350.PAA25451@hub.freebsd.org>
Date: Sat, 6 Dec 1997 15:50:19 -0800 (PST)
From: jmr@ugcs.caltech.edu
To: freebsd-gnats-submit@freebsd.org
Subject: dlfcn.h has wrong prototype for dlopen()
X-Send-Pr-Version: www-1.0

>Number:         5243
>Category:       i386
>Synopsis:       dlfcn.h has wrong prototype for dlopen()
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Dec  6 16:00:01 PST 1997
>Closed-Date:    Sat Dec 6 20:27:00 PST 1997
>Last-Modified:  Sat Dec  6 20:27:51 PST 1997
>Originator:     Jesse Rosenstock
>Release:        2.2.5-STABLE
>Organization:
California Institute of Technology
>Environment:
FreeBSD tla.caltech.edu 2.2.5-STABLE FreeBSD 2.2.5-STABLE #3: Thu Dec  4 03:26:23 PST 1997     jmr@tla.caltech.edu:/usr/src/sys/compile/TLA  i386

>Description:
The prototype for dlopen() should be void *dlopen(const char *, int)
(the man page gets it right), but dlfcn.h has the first arg as a
char *.
>How-To-Repeat:
look at dlfcn.h
>Fix:
--- /usr/src/lib/csu/i386/dlfcn.h       Fri Aug  8 18:03:58 1997
+++ /usr/include/dlfcn.h        Sat Dec  6 15:38:11 1997
@@ -51,7 +51,7 @@
 #define RTLD_NEXT      ((void *) -1)
 
 __BEGIN_DECLS
-void *dlopen __P((char *, int));
+void *dlopen __P((const char *, int));
 void *dlsym __P((void *, char *));
 char *dlerror __P((void));
 int dlclose __P((void *));

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: brian 
State-Changed-When: Sat Dec 6 20:27:00 PST 1997 
State-Changed-Why:  
Changes are now merged from -current into RELENG_2_2. 
>Unformatted:
