Files
mercury/robdd/robdd_conf.h.in
Zoltan Somogyi 9ae9180ef5 Fix C compiler warnings for robdd.m.
When compiling the library directory, we used to get C compiler warnings
about assigning ints to pointers, because on many machines an int is 32 bits,
while pointers are 64. The problem was in robdd/bryant.c, which is bodily

robdd/robdd_conf.h.in:
    New autoconfigured file that specifies what integer type to use
    in robdd nodes (it is now given the typedef name MR_ROBDD_int),
    and how many bits it has.

configure.ac:
    Build robdd_conf.h from robdd_conf.h.in after gathering the info it needs.

robdd/bryant.[ch]:
    Replace almost all uses of ints with MR_ROBDD_ints. The only exceptions
    are the places where int is used as a bool, and where it is used
    as a comparison result (where we need distinguish only between -1, 0, 1).

    In places where MR_ROBDD_ints are printed out, print them with %ld
    after casting them to long.

    Replace the only use of unsigned long, in bitmasks, with MR_ROBDD_uint,
    the unsigned version of MR_ROBDD_int. As far as I can tell, it always
    should have been the same size as the signed ints (and on most 32 bit
    architectures, it was, although by accident).

    Note that bryant.c does NOT compile if e.g. MR_ROBDD_STATISTICS
    is defined. However, that is not the fault of this diff; even the
    version before this diff (from 2004!) had that problem.

    Fix some obvious formatting issues.

    Delete some functions that were declared but never called. (In fact,
    one wasn't even defined :-()

library/Mmakefile:
    Rebuild robdd.o if any of ../robdd/{bryant.[ch],robdd_conf.h} is modified.
2014-09-10 01:43:13 +02:00

17 lines
310 B
C

/*
** Autoconfigured parameters for bryant.[ch].
*/
#ifndef MR_ROBDD_CONF_H
#define MR_ROBDD_CONF_H
#undef MR_ROBDD_int
#undef MR_ROBDD_uint
#undef MR_ROBDD_int_max
/* number of bits in an MR_ROBDD_int, and the log (base 2) of that */
#undef MR_ROBDD_BITS_PER_WORD
#undef MR_ROBDD_LOG_BITS_PER_WORD
#endif