Re: Buffer v1.4

From: Daniel Koepke (dkoepke@CALIFORNIA.COM)
Date: 08/22/97


It might be important to note the "#ifdef __FUNCTION__" won't work.
Test it with the following:

  #include <stdio.h>
  int test = 0;

  void main(void)
  {
    #ifdef __FUNCTION__
      test = 1;
    #endif
    printf("__FUNCTION__==%s, test==%d\n", __FUNCTION__, test);
  }

The reason being that __FUNCTION__ is not a #define, but a string.  Hence,
the "#ifdef" is worthless.  I'm only pointing this out because you
suggested the addition of

  #ifndef __FUNCTION__
  #  define __FUNCTION__  __FILE__
  #endif

in a prior message (or at least, an equivalent of said code).  This
will do the "#define __FUNCTION__ __FILE__" even on gcc.  At least,
it does with gcc 2.7.3.


--
Daniel Koepke -:- dkoepke@california.com -:-  [Shadowlord/Nether]
Think.


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST