#!/bin/sh
if [ "x$NGX_CC_NAME" = "x" -o "x$ngx_type" = "x" ] ; then
echo "unknown"
fi
if [ "$ngx_type" = "int" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_INT__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "long" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_LONG__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "long long" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_LONG_LONG__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "size_t" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_SIZE_T__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "sig_atomic_t" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_INT__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "void *" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_POINTER__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "off_t" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_PTRDIFF_T__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
elif [ "$ngx_type" = "time_t" ] ; then
size_from_cpp=`${CC} -dM -E - < /dev/null | grep __SIZEOF_PTRDIFF_T__ | cut -f3 -d' ' | sed 's,^[ \t]*,,' | sed 's,[ \t]*$,,'`
echo "$size_from_cpp"
fi