Closed Bug 10089 Opened 21 years ago Closed 20 years ago

do not do extern C over include files

Categories

(Core :: Security: CAPS, defect, P3)

Sun
Solaris
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: Dan.Oscarsson, Assigned: norrisboyd)

Details

Files: mozilla/caps/src/nsUserDialogHelper.cpp
       mozilla/caps/src/nsPrivilegeManager.cpp

When you do extern C over include files you may
do extern C over overloaded C routines.
With Sun Wokshop 5.0 there is C++ adapted standard include
files with such overloads. And teherfore can the file not
be compiled.

Below fixed just so that it compiles, should really be fixed
by extern C in the needed included files instead.


*** nsPrivilegeManager.cpp.org  Sun Jul 18 11:51:57 1999
--- nsPrivilegeManager.cpp      Sun Jul 18 11:52:08 1999
***************
*** 64,72 ****
  static PRBool RDF_RemovePrincipal(nsPrincipal *prin);
  static PRBool RDF_RemovePrincipalsPrivilege(nsPrincipal *prin, nsTarget
*target);


  PR_BEGIN_EXTERN_C
- #include "xp.h"
  #include "prefapi.h"

  PRBool CMGetBoolPref(char * pref_name)
--- 64,72 ----
  static PRBool RDF_RemovePrincipal(nsPrincipal *prin);
  static PRBool RDF_RemovePrincipalsPrivilege(nsPrincipal *prin, nsTarget
*target);

+ #include "xp.h"

  PR_BEGIN_EXTERN_C
  #include "prefapi.h"

  PRBool CMGetBoolPref(char * pref_name)
*** nsUserDialogHelper.cpp.org  Sun Jul 18 11:51:35 1999
--- nsUserDialogHelper.cpp      Sun Jul 18 11:51:49 1999
***************
*** 16,27 ****
   * Reserved.
   */

  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */

  #include "nsUserDialogHelper.h"
- #include "xp.h"
  #include "xpgetstr.h"
  #include "prprf.h"

--- 16,27 ----
   * Reserved.
   */

+ #include "xp.h"
  #ifdef __cplusplus
  extern "C" {
  #endif /* __cplusplus */

  #include "nsUserDialogHelper.h"
  #include "xpgetstr.h"
  #include "prprf.h"
Assignee: norris → arielb
Summary: do not do extern C over include files → do not do extern C over include files
Target Milestone: M9
Whiteboard: hoping to fix
Whiteboard: hoping to fix
Target Milestone: M9 → M10
Won't be done in time for M9; postponing to M10. Sorry.
Status: NEW → ASSIGNED
this stuff should be taken care of in a checkin within the next day, i'll make
sure tomorrow and close it then in that case.
Assignee: arielb → norris
Status: ASSIGNED → NEW
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
These files have now been removed from the build.
Verified.
Status: RESOLVED → VERIFIED
QA Contact: dshea → junruh
Component: CAPS → Security: CAPS
Moving all CAPS bugs to Security: CAPS component.  CAPS component will be 
deleted.
You need to log in before you can comment on or make changes to this bug.