do not do extern C over include files

VERIFIED FIXED in M9

Status

defect
P3
normal
VERIFIED FIXED
20 years ago
11 years ago

People

(Reporter: Dan.Oscarsson, Assigned: rhp)

Tracking

Trunk
Sun
Solaris

Firefox Tracking Flags

(Not tracked)

Details

Files: mozilla/mailnews/mime/src/comi18n.h
       mozilla/mailnews/mime/src/mimemoz2.h

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.

*** comi18n.h.org       Sun Jul 18 11:52:46 1999
--- comi18n.h   Sun Jul 18 11:53:25 1999
***************
*** 17,26 ****
   */


- #ifdef __cplusplus
- extern "C" {
- #endif /* __cplusplus */
-
  #ifndef kMIME_ENCODED_WORD_SIZE
  #define kMIME_ENCODED_WORD_SIZE 75
  #endif
--- 17,22 ----
***************
*** 31,36 ****
--- 27,36 ----

  #include "xp_core.h"

+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+
  /**
   * If a header is MIME encoded then decode a header and sets a charset name.
   * This is a replacement for INTL_DecodeMimePartIIStr.
*** mimemoz2.h.org      Sun Jul 18 11:53:36 1999
--- mimemoz2.h  Sun Jul 18 11:54:19 1999
***************
*** 34,42 ****
--- 34,52 ----
  #ifdef XP_UNIX
  #undef Bool
  #endif
+
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
+

  #include "net.h"
  #include "mimei.h"
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+
  #include "nsIPref.h"

  #define     MIME_PREFS_FILE   "prefs50.js"
Status: NEW → ASSIGNED
Target Milestone: M9
Thanks. I'll try to get into the tree when it opens.

- rhp
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Checked in this fix yesterday.

- rhp
QA Contact: lchiang → ppandit
Par or Suresh, can you verify this?
Status: RESOLVED → VERIFIED
Code as been entered as suggested by reporter.

VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.