Bug 10477 - Lost support for USE_UINT_ENUMS in waf
Summary: Lost support for USE_UINT_ENUMS in waf
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Build (show other bugs)
Version: unspecified
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Björn Jacke
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-28 09:47 UTC by Andrew Bartlett
Modified: 2014-10-13 10:41 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Bartlett 2014-02-28 09:47:13 UTC
I noticed this check didn't make it into WAF

-############################################
-# check if the compiler can handle negative enum values
-# and don't truncate the values to INT_MAX
-# a runtime test is needed here
-AC_CACHE_CHECK([that the C compiler understands negative enum values],samba_cv_CC_NEGATIVE_ENUM_VALUES, [
-    AC_TRY_RUN(
-[
-       #include <stdio.h>
-       enum negative_values { NEGATIVE_VALUE = 0xFFFFFFFF };
-       int main(void) {
-               enum negative_values v1 = NEGATIVE_VALUE;
-               unsigned v2 = 0xFFFFFFFF;
-               if (v1 != v2) {
-                       printf("v1=0x%08x v2=0x%08x\n", v1, v2);
-                       return 1;
-               }
-               return 0;
-       }
-],
-       samba_cv_CC_NEGATIVE_ENUM_VALUES=yes,
-       samba_cv_CC_NEGATIVE_ENUM_VALUES=no,
-       samba_cv_CC_NEGATIVE_ENUM_VALUES=yes)])
-if test x"$samba_cv_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then
-       AC_DEFINE(USE_UINT_ENUMS, 1, [Whether the compiler has uint enum support])
-fi
-
-AC_MSG_CHECKING([for test routines])
-AC_TRY_RUN([#include "${srcdir-.}/../tests/trivial.c"],
-           AC_MSG_RESULT(yes),
-           AC_MSG_ERROR([cant find test code. Aborting config]),
-           AC_MSG_WARN([cannot run when cross-compiling]))
-