IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 8, 2023, 11:51:50 AM (3 years ago)
Author:
eugene
Message:

merge from eam_branches/ipp-20220316. deal with more restrictive gcc / autoconf: add no_warn version of strncpy; mysql removes my_bool after v8.0.0

Location:
trunk/psLib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib

  • trunk/psLib/src/db/psDB.c

    r41896 r42378  
    5656
    5757
     58# if (MYSQL_VERSION_ID >= 80000)
     59    # define MYSQL_BOOL bool
     60# else
     61    # define MYSQL_BOOL my_bool
     62# endif
     63
    5864// set the pointer to NULL if we are actually freeing the memory
    5965#define PSDB_NULL_FREE(ptr) \
     
    138144
    139145// pType utility functions
    140 static psPtr    psDBGetPTypeNaN(psElemType pType);
    141 static bool    psDBIsPTypeNaN(psElemType pType, psPtr data);
     146static psPtr      psDBGetPTypeNaN(psElemType pType);
     147static MYSQL_BOOL psDBIsPTypeNaN(psElemType pType, psPtr data);
    142148
    143149// public functions
     
    753759    // the return value also needs to be inverted for the same reason.
    754760    // is it safe to assume my_bool always safely casts to bool?
     761    // XXX EAM 2022.03.15 : at least in mysql 8.0.28, my_bool is gone and just bool is used
     762    // in 5.0 and 5.6, my_bool is char
     763    //
    755764    return !(bool)mysql_autocommit(dbh->mysql, !mode);
    756765}
     
    14471456
    14481457    mysqlType       *mType;             // type tmp variable
    1449     static my_bool isNull = true;       // used in a MYSQL_BIND to indicate NULL
     1458
     1459    // XXX EAM 2022.03.15 : at least in mysql 8.0.28, my_bool is gone and just bool is used
     1460    // in 5.0 and 5.6, my_bool is char
     1461    static MYSQL_BOOL isNull = true;       // used in a MYSQL_BIND to indicate NULL
    14501462
    14511463    MYSQL_BIND *bind = mysqlRow->bind;
     
    16021614                    // assume for the time being that we don't have negative
    16031615                    // time as ISO8601 doesn't support dates prior to 0
    1604                     myTime->neg     = (my_bool)false;
     1616                    // XXX EAM 2022.03.15 : at least in mysql 8.0.28, my_bool is gone and just bool is used
     1617                    // in 5.0 and 5.6, my_bool is char
     1618                    myTime->neg     = (bool)false;
    16051619                    // currently unused by mysql
    16061620                    myTime->second_part  = (unsigned long)time->nsec;
     
    28692883#define PS_IS_NAN(type, data, nan) *(type *)data == nan
    28702884
    2871 static bool psDBIsPTypeNaN(psElemType pType,
    2872                            psPtr data)
     2885static MYSQL_BOOL psDBIsPTypeNaN(psElemType pType, psPtr data)
     2886
    28732887{
    28742888    bool    isNaN = NULL;
Note: See TracChangeset for help on using the changeset viewer.