Change #ifdef to #if after move to meson

Unlike with autotools, meson options negative-errno-on-fail and
update-functional-on-fail are written to the generated config.h file
regardless of if they are enabled are not, such as

    #define NEGATIVE_ERRNO_ON_FAIL 1
and
    #define NEGATIVE_ERRNO_ON_FAIL 0

That means the code that checks the values needs to be an #if and not an

The bitbake recipe has now switched over to building with meson, so
right now openbmc master may not be building with the correct options
depending on how these are set in the various bbappends.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I9db63c3b66c1e02175528b224cc9f0d997d31272
3 files changed
tree: 790fdacdaa9b9f39d0661f626f90c2ae19bc0a42
  1. msl/
  2. test/
  3. tools/
  4. .clang-format
  5. .gitignore
  6. .lcovrc
  7. .shellcheck
  8. average.cpp
  9. average.hpp
  10. bootstrap.sh
  11. configure.ac
  12. env.cpp
  13. env.hpp
  14. fan_pwm.cpp
  15. fan_pwm.hpp
  16. fan_speed.cpp
  17. fan_speed.hpp
  18. gpio_handle.cpp
  19. gpio_handle.hpp
  20. hwmon.cpp
  21. hwmon.hpp
  22. hwmonio.cpp
  23. hwmonio.hpp
  24. interface.hpp
  25. LICENSE
  26. mainloop.cpp
  27. mainloop.hpp
  28. MAINTAINERS
  29. Makefile.am
  30. meson.build
  31. meson_options.txt
  32. readd.cpp
  33. README.iio.md
  34. README.md
  35. sensor.cpp
  36. sensor.hpp
  37. sensorset.cpp
  38. sensorset.hpp
  39. sysfs.cpp
  40. sysfs.hpp
  41. targets.hpp
  42. thresholds.hpp
  43. types.hpp
  44. util.hpp
README.md

Exposes generic hwmon entries as DBus objects. More information can be found at Sensor Architecture

To Build

To build this package, do the following steps:

    1. ./bootstrap.sh
    2. ./configure ${CONFIGURE_FLAGS}
    3. make

To clean the repository run `./bootstrap.sh clean`.

D-Bus bus names

To enable the use of Linux features like cgroups prioritization and
udev/systemd control, one instance of phosphor-hwmon is intended to
be run per hwmon sysfs class instance.

This requires an algorithm for selecting a stable, well-known D-Bus busname.

The algorithm is <PREFIX>-<ID>.Hwmon<N> where PREFIX is an autoconf
configurable prefix (BUSNAME_PREFIX, xyz.openbmc_project by default),
ID is a std::hash of the /sys/devices path backing the hwmon class
instance, and N is the implemented phosphor-hwmon D-Bus API version.