Closed Bug 281250 Opened 20 years ago Closed 20 years ago

inconsistent function decorations (PR_IMPLEMENT v. extern)

Categories

(NSPR :: NSPR, defect)

Other
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: wtc)

Details

Attachments

(1 file)

I just scrolled through a scrollback from a random box i was using. the problem
seems real, afaik PR_IMPLEMENT and PR_EXTERN are supposed to be used as pairs.

/home/play/mozilla/nsprpub/pr/src/md/unix/unix.c:3342: warning: redeclaration of
'_MD_LockFile' with different visibility (old visibility preserved)
/home/play/mozilla/firefoxsvg/dist/include/nspr/md/_unixos.h:358: warning:
previous declaration of '_MD_LockFile' was here
/home/play/mozilla/nsprpub/pr/src/md/unix/unix.c:3359: warning: redeclaration of
'_MD_TLockFile' with different visibility (old visibility preserved)
/home/play/mozilla/firefoxsvg/dist/include/nspr/md/_unixos.h:359: warning:
previous declaration of '_MD_TLockFile' was here
/home/play/mozilla/nsprpub/pr/src/md/unix/unix.c:3376: warning: redeclaration of
'_MD_UnlockFile' with different visibility (old visibility preserved)
/home/play/mozilla/firefoxsvg/dist/include/nspr/md/_unixos.h:360: warning:
previous declaration of '_MD_UnlockFile' was here
/home/play/mozilla/nsprpub/pr/src/md/unix/unix.c:3464: warning: redeclaration of
'_MD_gethostname' with different visibility (old visibility preserved)
/home/play/mozilla/firefoxsvg/dist/include/nspr/md/_unixos.h:473: warning:
previous declaration of '_MD_gethostname' was here
/home/play/mozilla/nsprpub/pr/src/md/unix/unix.c:3476: warning: redeclaration of
'_MD_getsysinfo' with different visibility (old visibility preserved)
/home/play/mozilla/firefoxsvg/dist/include/nspr/md/_unixos.h:476: warning:
previous declaration of '_MD_getsysinfo' was here
Linux localhost.localdomain 2.6.10-1.741_FC3 #1 Thu Jan 13 16:35:56 EST 2005
x86_64 x86_64 x86_64 GNU/Linux

given the magic relating to windows and other native impls of things, i wonder
if this isn't fixable, or if i'm misinterpretting the problem.
OS: All → Linux
Hardware: Macintosh → Other
Attached patch Proposed patchSplinter Review
Thanks for the bug report.  PR_IMPLEMENT should only
be used on definitions of functions exported from a
shared library.  The functions in question are all
internal functions.  So they shouldn't be defined
with PR_IMPLEMENT.

timeless, could you test this patch?  Thanks.
Attachment #176808 - Flags: review?(timeless)
I checked in the patch on the NSPR tip (NSPR 4.6) and
the NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.8 Beta 2).
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.6
Attachment #176808 - Flags: review?(timeless)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: