uintptr_t 737 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright (C) Igor Sysoev
  2. echo $ngx_n "checking for uintptr_t ...$ngx_c"
  3. echo >> $NGX_ERR
  4. echo "checking for uintptr_t" >> $NGX_ERR
  5. found=no
  6. cat << END > $NGX_AUTOTEST.c
  7. #include <sys/types.h>
  8. $NGX_INTTYPES_H
  9. int main() {
  10. uintptr_t i = 0;
  11. return 0;
  12. }
  13. END
  14. eval "$CC -o $NGX_AUTOTEST $NGX_AUTOTEST.c >> $NGX_ERR 2>&1"
  15. if [ -x $NGX_AUTOTEST ]; then
  16. echo " uintptr_t found"
  17. found=yes
  18. else
  19. echo $ngx_n " uintptr_t not found" $ngx_c
  20. fi
  21. rm $NGX_AUTOTEST*
  22. if [ $found = no ]; then
  23. found="uint`expr 8 \* $ngx_ptr_size`_t"
  24. echo ", $found used"
  25. echo "typedef $found uintptr_t;" >> $NGX_AUTO_CONFIG_H
  26. echo "typedef $found intptr_t;" | sed -e 's/u//g' >> $NGX_AUTO_CONFIG_H
  27. fi