diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2003-11-20 07:05:50 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-20 07:05:50 +0000 |
| commit | bb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8 (patch) | |
| tree | 686cdfcc4199f807495a150e410f43940c4451cc /auto/types/uintptr_t | |
| parent | 160d774afcf3cdd4f999489211eb9d78bf82439a (diff) | |
| download | nginx-bb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8.tar.gz nginx-bb6ec8c9fd4d23848ac3dddb1296d8fac5c99da8.tar.bz2 | |
nginx-0.0.1-2003-11-20-10:05:50 import; auto/configure
Diffstat (limited to 'auto/types/uintptr_t')
| -rw-r--r-- | auto/types/uintptr_t | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/auto/types/uintptr_t b/auto/types/uintptr_t new file mode 100644 index 000000000..f2cfe6225 --- /dev/null +++ b/auto/types/uintptr_t @@ -0,0 +1,45 @@ + +found=0 + +echo 'Checking for uintptr_t' + + echo '#include <sys/types.h>' > autotest.c + echo 'int main() { uintptr_t i = 0; return i; }' >> autotest.c + + eval "${CC} -o autotest autotest.c > /dev/null 2>&1" + + if [ -x autotest ]; then + echo ' + uintptr_t found' + found=1 + else + echo ' + uintptr_t not found' + fi + + rm autotest* + + +if [ $found = 0 ]; then + echo 'int main() { printf("%d", 8 * sizeof(void *)); return 0; }' \ + > autotest.c + eval "${CC} -o autotest autotest.c > /dev/null 2>&1" + + if [ -x autotest ]; then + type="uint`./autotest`_t" + echo " + $type used" + type="typedef $type uintptr_t;" + found=2 + fi +fi + + +if [ $found = 0 ]; then + echo "$0: error: uintptr_t not found" + exit 1 +fi + + +if [ $found = 2 ]; then + echo $type >> ngx_auto_config.h + echo >> ngx_auto_config.h +fi + |
