helppokersource - Support: sr #2638, mixed-convention #include...

Show feedback again

sr #2638: mixed-convention #include directives in poker-eval includes

Submitted by:  None
Submitted on:  Fri 29 Oct 2010 12:48:42 PM UTC  
Category: poker-evalPriority: 5 - Normal
Severity: 2 - MinorStatus: None
Privacy: PublicAssigned to: None
Originator Email: -unavailable-Open/Closed: Open
Operating System: NoneEffort: 0.00

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Fri 29 Oct 2010 12:48:42 PM UTC, original submission:


poker-eval include files include other poker-eval includes
with the condition that a software developer adds the path
to poker-eval includes to the compiler using the -I option,
but sometimes use $includedir search paths and sometimes
relative paths.

Some of the headers (e.g. poker_wrapper.h) use <> around
included filenames (search in include dirs), while most
other files use "" (relative paths).

Example solution (just one random file grabbed here):
#include "poker_defs.h" <-- wrong syntax
#include "inlines/eval.h" <-- wrong syntax
better: (still requires "-I$(includedir)/poker-eval")
#include <poker_defs.h>
#include <inlines/eval.h>
even better:
either just use the default $includedir:
#include <poker-eval/poker_defs.h>
#include <poker-eval/inlines/eval.h>
or, use relative paths in all include files:
#include "../poker_defs.h"
#include "eval.h"

The latter syntax would also ensure that includes would
never be mixed between two different installed versions
of the poker-eval includes.





(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by None (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup