www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/15/21:25:58

Date: Mon, 15 Aug 94 16:26 PDT
From: jdp AT polstra DOT com (John Polstra)
To: djgpp AT polstra DOT com
Subject: Incorrect #ifdefs in <stdlib.h>

In case this hasn't been reported to death already ...

In djgpp 1.12, there are two incorrect #ifdefs in "include/stdlib.h".
Both of them read:

    #ifdef _cplusplus

but both of them should read:

    #ifdef __cplusplus

In other words, "__cplusplus" is misspelled with only 1 leading underscore,
when it should have two leading underscores.

The bug prevents certain library functions, such as div() and ldiv(),
from begin declared as ``extern "C"'' functions, resulting in undefined
symbols at link time.

   John Polstra                                       jdp AT polstra DOT com
   John D. Polstra & Co., Inc.                   Phone (206) 932-6482
   Seattle, Washington USA                         Fax (206) 935-1262
   "Self-knowledge is always bad news."                 -- John Barth

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019