POV-Ray : Newsgroups : povray.programming : To POV-Team: Please put "#define fabs fabs" into config.h... : Re: To POV-Team: Please put "#define fabs fabs" into config.h... Server Time
28 Jul 2024 10:26:04 EDT (-0400)
  Re: To POV-Team: Please put "#define fabs fabs" into config.h...  
From: Vadim Sytnikov
Date: 28 May 2002 13:33:10
Message: <3cf3bf56$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote:
> Well, C libraries implement this as macro rather than function,
> otherwise you would be seeing compiler errors if the library is
> defining an appropriate function prototype because the macro
> would be applied to that function prototype as well!

Similarly, you would be seeing compiler errors if you wrote, say
  #define strcpy(s1,s2) memcpy((s1),(s2),strlen(s2)+1)
  #include <string.h>

But that would be *your* problems, right? :-) Once again, not all C
libraries define fabs() as a macro, since often there are more efficient way
to do the job. And I was talking about those other C libraries.

> Even more important, didn't you receive a reply from Nathan
> about Object_Struct yesterday that already answered this question...?

Please see my previous message.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.