Re: Koji cannot build emacs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 9 Aug 2007, Roland McGrath wrote:

> > sound.c:1472:51: error: macro "open" requires 3 arguments, but only 1 given
> [...]
> > What should I do ?  Drop "-D_FORTIFY_SOURCE=2" from the CFLAGS?
> 
> Nope.  Fix the program to be POSIX-compliant by not assuming open is not a
> macro.  You can replace open or foo->open with (open) or (foo->open),
> or you can add an #undef open where it's used.  The former is
> better.

This patch works:

--- emacs-22.1/src/sound.c~	2007-03-06 07:14:14.000000000 -0500
+++ emacs-22.1/src/sound.c	2007-08-09 15:54:52.117018000 -0400
@@ -1469,7 +1469,7 @@ Internal use only, use `play-sound' inst
       error ("No usable sound device driver found");
 
   /* Open the device.  */
-  current_sound_device->open (current_sound_device);
+  (current_sound_device->open) (current_sound_device);
 
   /* Play the sound.  */
   current_sound->play (current_sound, current_sound_device);


And I'm happy to build this way, however ...

<rant>

"open" has to be one of the most overloaded names in programming.
Changing the semantics of that name is something that should be done
very carefully and very reluctantly, and I don't care what POSIX says
about it.

</rant>

Chip

-- 
Charles M. "Chip" Coldwell
Senior Software Engineer
Red Hat, Inc
978-392-2426

--
Fedora-maintainers mailing list
Fedora-maintainers@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers

--
Fedora-maintainers-readonly mailing list
Fedora-maintainers-readonly@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-maintainers-readonly

[Index of Archives]     [Fedora Users]     [Fedora Development]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux