Shouldn't it be possible to use an #if MYSQL_READ_DEFAULT_FILE>0 then? I'll write a configure-test anyway, but I'm curious...
/ Marcus Agehall (Trådlös)
Previous text:
2003-02-19 22:58: Subject: Mysql
The code above is where Pike indeed does load the my.cnf file. After inserting a few printfs I concluded that the second ifdef statement is false and thus the code within the inner ifdefs doesn't execute. MYSQL_READ_DEFAULT_FILE & Co are defined within mysql.h from the MySQL source within an enum construction. If I try to print the value of it using a printf, it shows that MYSQL_READ_DEFAULT_FILE==4.
Enums are NOT defines, and can thus not be tested for with #ifdef et al. Write a configure-test for the enum value you want to use.
/ Henrik Grubbström (Lysator)