samba-use-unsigned-enums.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff -ur samba-3.0.25a/source/configure.in samba-3.0.25a-patched/source/configure.in
  2. --- samba-3.0.25a/source/configure.in 2007-06-19 11:40:49.000000000 -0500
  3. +++ samba-3.0.25a-patched/source/configure.in 2007-06-19 11:45:04.000000000 -0500
  4. @@ -511,37 +511,8 @@
  5. AC_DEFINE(HAVE_VOLATILE, 1, [Whether the C compiler understands volatile])
  6. fi
  7. -############################################
  8. -# check if the compiler can handle negative enum values
  9. -# and don't truncate the values to INT_MAX
  10. -# a runtime test is needed here
  11. -AC_SUBST(PIDL_ARGS)
  12. -AC_CACHE_CHECK([that the C compiler understands negative enum values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [
  13. - AC_TRY_RUN(
  14. -[
  15. - #include <stdio.h>
  16. - enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
  17. - int main(void) {
  18. - enum negative_values v1 = NEGATIVE_VALUE;
  19. - unsigned v2 = NEGATIVE_VALUE;
  20. -
  21. - if (v1 != 0xFFFFFFFF) {
  22. - printf("%u != 0xFFFFFFFF\n", v1);
  23. - return 1;
  24. - }
  25. - if (v2 != 0xFFFFFFFF) {
  26. - printf("%u != 0xFFFFFFFF\n", v2);
  27. - return 1;
  28. - }
  29. -
  30. - return 0;
  31. - }
  32. -],
  33. - SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)])
  34. -if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
  35. - AC_MSG_WARN([using --unit-enums for pidl])
  36. - PIDL_ARGS="$PIDL_ARGS --uint-enums"
  37. -fi
  38. +# Just hard code this for cross compile cases
  39. +PIDL_ARGS="$PIDL_ARGS --uint-enums"
  40. dnl Figure out the flags to support named structure initializers