STR #3288

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Post Text | Post File | Prev | Next ]

STR #3288

Application:FLTK Library
Status:5 - New
Priority:1 - Request for Enhancement, e.g. asking for a feature
Scope:3 - Applies to all machines and operating systems
Subsystem:Config Files
Summary:Consistent configuration macros
Created By:skunk
Assigned To:AlbrechtS
Fix Version:Unassigned
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Post File ]

No files

Trouble Report Comments:

Post Text ]
Name/Time/Date Text top right image
#1 skunk
02:00 Feb 28, 2016
[This bug should be filed against 1.4-feature, but that is not yet an option in the new-bug form.]

This was previously discussed in

(see comments #9 and #20).

Currently, configuration cpp macros defined in the generated config.h header take either of two forms:

* Define to 0 or 1 (e.g. HAVE_GL)

* Leave undefined, or define to 1 (e.g. USE_X11)

This is confusing and error-prone. For example. the first kind of macro is normally checked using #if, and the second is checked using #ifdef or "#if defined()". If you get mixed up and check the first kind of macro with #ifdef, then the conditional is always enabled, regardless of the value. If you check the second kind of macro using #if, you get -Wundef warnings from GCC when the macro is undefined.

Autoconf has standardized on the second kind of macro, and I believe we should too. I propose that all macros of the first kind be converted to the second kind, so that all config macros are undef-or-1, and will gladly provide a patch if this is acceptable.
#2 AlbrechtS
13:52 Feb 28, 2016
Thanks for posting this, moved to 1.4-feature, priority 1 (RFE).  
bottom left image   bottom right image

Return to Bugs & Features | Post Text | Post File ]


Comments are owned by the poster. All other content is copyright 1998-2023 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.