# Defining uint64\_t, etc., during configure

**URL:** <https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595>\
**Category:** NGINX\
**Created:** [April 26, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595 "2010-04-26T16:09:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 26, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/1 "2010-04-26T16:09:23Z")

</div>

A system where I’m trying to build nginx doesn’t define a few types it  
needs like uint64\_t, uint32\_t, uintptr\_t, etc., anywhere in  
/usr/include. What is the proper way to define these missing types for  
nginx’s configure?

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 27, 2010, 7:50pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/2 "2010-04-27T19:50:54Z")

</div>

On Mon, Apr 26, 2010 at 10:08:59AM -0400, Brian Lewis wrote:

> A system where I’m trying to build nginx doesn’t define a few types it  
> needs like uint64\_t, uint32\_t, uintptr\_t, etc., anywhere in  
> /usr/include. What is the proper way to define these missing types for  
> nginx’s configure?

It seems there is no way currently to make it right.  
What is your system ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 27, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/3 "2010-04-27T19:57:56Z")

</div>

On Tuesday, 27.04.10 at 21:50, Igor S. wrote:

> On Mon, Apr 26, 2010 at 10:08:59AM -0400, Brian Lewis wrote:
> 
> > A system where I’m trying to build nginx doesn’t define a few types  
> > it needs like uint64\_t, uint32\_t, uintptr\_t, etc., anywhere in  
> > /usr/include. What is the proper way to define these missing types  
> > for nginx’s configure?
> 
> It seems there is no way currently to make it right.  
> What is your system ?

The 'uname -a’s are

SCO\_SV sco5 3.2 5.0.6 i386  
SCO\_SV sco6 5 6.0.0 i386

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 27, 2010, 9:40pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/4 "2010-04-27T21:40:23Z")

</div>

On Tuesday, 27.04.10 at 22:35, Igor S. wrote:

> Try the attached patch. It should show found replacements and fail on  
> uintptr\_t. Could you show the new ./configure output from
> 
> checking for int size … 4 bytes  
> to  
> checking for uintptr\_t …
> 
> ?

Thank you for the patch. The output is

checking for int size … 4 bytes  
checking for long size … 4 bytes  
checking for long long size … 8 bytes  
checking for void \* size … 4 bytes  
checking for int64\_t … int64\_t not found, long long used  
checking for uint64\_t … uint64\_t not found u\_int64\_t not found,  
unsigned long long used  
checking for int32\_t … int32\_t not found, int used  
checking for uint32\_t … uint32\_t not found u\_int32\_t not found,  
unsigned int used  
checking for sig\_atomic\_t … found  
checking for sig\_atomic\_t size … 4 bytes  
checking for socklen\_t … socklen\_t not found, int used  
checking for in\_addr\_t … in\_addr\_t not found uint32\_t not found,  
unsigned int used  
checking for in\_port\_t … in\_port\_t not found, u\_short used  
checking for rlim\_t … found  
checking for uintptr\_t … uintptr\_t not found , uint32\_t used

./configure completes successfully. Then, make produces

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter  
-Wunused-function -Wunused-variable -Wunused-value -Werror -g -I  
src/core -I src/event -I src/event/modules -I src/os/unix -I objs   
-o objs/src/core/nginx.o   
src/core/nginx.c  
In file included from src/os/unix/ngx\_posix\_config.h:96,  
from src/core/ngx\_config.h:41,  
from src/core/nginx.c:7:  
objs/ngx\_auto\_config.h:167: warning: redefinition of `int32_t' /usr/include/sys/bitypes.h:82: warning: `int32\_t’ previously declared  
here

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 27, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/5 "2010-04-27T21:50:56Z")

</div>

On Tue, Apr 27, 2010 at 03:39:25PM -0400, Brian Lewis wrote:

> Thank you for the patch. The output is  
> checking for sig\_atomic\_t size … 4 bytes  
> src/core/nginx.c  
> In file included from src/os/unix/ngx\_posix\_config.h:96,  
> from src/core/ngx\_config.h:41,  
> from src/core/nginx.c:7:  
> objs/ngx\_auto\_config.h:167: warning: redefinition of `int32_t' /usr/include/sys/bitypes.h:82: warning: `int32\_t’ previously declared here

It seems SCO has int32\_t. Then could you show what is after  
“checking for int32\_t” in objs/autoconf.err ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 27, 2010, 8:35pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/6 "2010-04-27T20:35:59Z")

</div>

On Tue, Apr 27, 2010 at 01:57:32PM -0400, Brian Lewis wrote:

> The 'uname -a’s are
> 
> SCO\_SV sco5 3.2 5.0.6 i386  
> SCO\_SV sco6 5 6.0.0 i386

Try the attached patch. It should show found replacements and fail on  
uintptr\_t. Could you show the new ./configure output from

checking for int size … 4 bytes  
to  
checking for uintptr\_t …

?

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 28, 2010, 9:19pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/7 "2010-04-28T21:19:02Z")

</div>

On Tue, Apr 27, 2010 at 04:09:36PM -0400, Brian Lewis wrote:

> ```
> return 0;
> 
> ```
> 
> }
> 
> Adding ‘#include \<sys/bitypes.h\>’ lets autotest.c compile.

It seems \<sys/bitypes.h\> is the right way to use int32\_t, etc. on SCO.  
Could you try the attached patch ?

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 28, 2010, 9:43pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/8 "2010-04-28T21:43:37Z")

</div>

On Wednesday, 28.04.10 at 23:18, Igor S. wrote:

> It seems \<sys/bitypes.h\> is the right way to use int32\_t, etc. on SCO.  
> Could you try the attached patch ?

Thank you for the patch.

checking for uint64\_t … uint64\_t not found u\_int64\_t not found  
./configure: error: can not define uint64\_t

\<sys/bitypes.h\> defines int32\_t and u\_int32\_t, but I don’t see any  
definitions for int64\_t or u\_int64\_t anywhere in /usr/include.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 27, 2010, 10:10pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/9 "2010-04-27T22:10:15Z")

</div>

On Tuesday, 27.04.10 at 23:50, Igor S. wrote:

> It seems SCO has int32\_t. Then could you show what is after  
> “checking for int32\_t” in objs/autoconf.err ?

## objs/autotest.c: In function `main': objs/autotest.c:11: error: `int32\_t’ undeclared (first use in this function) objs/autotest.c:11: error: (Each undeclared identifier is reported only once objs/autotest.c:11: error: for each function it appears in.) objs/autotest.c:11: error: parse error before “i”

#include \<sys/types.h\>  
#include \<signal.h\>  
#include \<sys/socket.h\>  
#include \<sys/time.h\>  
#include \<sys/resource.h\>  
#include \<netinet/in.h\>

int main() {  
int32\_t i = 0;  
return 0;  
}

Adding ‘#include \<sys/bitypes.h\>’ lets autotest.c compile.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 28, 2010, 9:52pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/10 "2010-04-28T21:52:24Z")

</div>

On Wed, Apr 28, 2010 at 03:42:45PM -0400, Brian Lewis wrote:

> definitions for int64\_t or u\_int64\_t anywhere in /usr/include.  
> Well, here is a new patch.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 28, 2010, 10:01pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/11 "2010-04-28T22:01:46Z")

</div>

On Wed, Apr 28, 2010 at 11:51:53PM +0400, Igor S. wrote:

> > \<sys/bitypes.h\> defines int32\_t and u\_int32\_t, but I don’t see any  
> > definitions for int64\_t or u\_int64\_t anywhere in /usr/include.
> 
> Well, here is a new patch.

Sorry, this patch is wrong. Here is a new one.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 28, 2010, 10:08pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/12 "2010-04-28T22:08:12Z")

</div>

On Thursday, 29.04.10 at 00:01, Igor S. wrote:

> Sorry, this patch is wrong. Here is a new one.

Thanks.

checking for int size … 4 bytes  
checking for long size … 4 bytes  
checking for long long size … 8 bytes  
checking for void \* size … 4 bytes  
checking for int64\_t … int64\_t not found, long long used  
checking for uint64\_t … uint64\_t not found u\_int64\_t not found,  
unsigned long long used  
checking for sig\_atomic\_t … found  
checking for sig\_atomic\_t size … 4 bytes  
checking for socklen\_t … socklen\_t not found, int used  
checking for in\_addr\_t … in\_addr\_t not found uint32\_t not found  
./configure: error: can not define in\_addr\_t

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 28, 2010, 10:05pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/13 "2010-04-28T22:05:52Z")

</div>

On Wednesday, 28.04.10 at 23:51, Igor S. wrote:

> Well, here is a new patch.

Thank you.

creating objs/Makefile  
checking for int size … 4 bytes  
checking for long size … 4 bytes  
checking for long long size … 8 bytes  
checking for void \* size … 4 bytes  
checking for int64\_t … int64\_t not found, long used  
checking for uint64\_t … uint64\_t not found u\_int64\_t:unsigned not  
found, long used  
checking for sig\_atomic\_t … found  
checking for sig\_atomic\_t size … 4 bytes  
checking for socklen\_t … socklen\_t not found, int used  
checking for in\_addr\_t … in\_addr\_t not found uint32\_t not found  
./configure: error: can not define in\_addr\_t

No definition for in\_addr\_t exists anywhere in /usr/include.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 3:47pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/14 "2010-04-29T15:47:08Z")

</div>

On Thursday, 29.04.10 at 10:30, Igor S. wrote:

> On Wed, Apr 28, 2010 at 04:07:57PM -0400, Brian Lewis wrote:
> 
> > checking for in\_addr\_t … in\_addr\_t not found uint32\_t not found  
> > ./configure: error: can not define in\_addr\_t
> 
> What is in objs/autoconf.err after  
> checking for sys/bitypes.h  
> ?

There are no errors in that section. \<sys/bitypes.h\> defines u\_int32\_t,  
though.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 8:31am UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/15 "2010-04-29T08:31:35Z")

</div>

On Wed, Apr 28, 2010 at 04:07:57PM -0400, Brian Lewis wrote:

> checking for uint64\_t … uint64\_t not found u\_int64\_t not found, unsigned long long used  
> checking for sig\_atomic\_t … found  
> checking for sig\_atomic\_t size … 4 bytes  
> checking for socklen\_t … socklen\_t not found, int used  
> checking for in\_addr\_t … in\_addr\_t not found uint32\_t not found  
> ./configure: error: can not define in\_addr\_t

What is in objs/autoconf.err after  
checking for sys/bitypes.h  
?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 3:56pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/16 "2010-04-29T15:56:30Z")

</div>

On Thu, Apr 29, 2010 at 09:46:00AM -0400, Brian Lewis wrote:

> though.  
> Well, here is a new patch.

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 4:03pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/17 "2010-04-29T16:03:31Z")

</div>

On Thursday, 29.04.10 at 17:55, Igor S. wrote:

> Well, here is a new patch.

Thank you. That patch allows ./configure to complete.

make produces  
src/core/ngx\_string.c: In function `ngx_vslprintf': src/core/ngx_string.c:275: warning: `ngx\_pid\_t’ is promoted to `int' when passed through `…’  
src/core/ngx\_string.c:275: warning: (so you should pass `int' not `ngx\_pid\_t’ to `va\_arg’)  
make[1]: \*\*\* [objs/src/core/ngx\_string.o] Error 1

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 3:58pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/18 "2010-04-29T15:58:50Z")

</div>

On Thu, Apr 29, 2010 at 05:55:27PM +0400, Igor S. wrote:

> > There are no errors in that section. \<sys/bitypes.h\> defines u\_int32\_t,  
> > though.
> 
> Well, here is a new patch.

BTW, if the patch will resolve the issue, could you please post full  
./configure ouput ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 4:40pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/19 "2010-04-29T16:40:25Z")

</div>

On Thu, Apr 29, 2010 at 10:06:58AM -0400, Brian Lewis wrote:

> On Thursday, 29.04.10 at 17:58, Igor S. wrote:
> 
> > BTW, if the patch will resolve the issue, could you please post full  
> > ./configure ouput ?
> 
> Output of  
> ./configure --without-http\_rewrite\_module --without-http-cache  
> :
> 
> checking for OS
> 
> - SCO\_SV 3.2 i386

> checking for off\_t size … 4 bytes

Does SCO support files \>2G ?

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![Brian\_Lewis](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/8e8cbc/32.png) [@Brian\_Lewis](https://www.ruby-forum.com/u/Brian_Lewis)\
**Post date:** [April 29, 2010, 4:07pm UTC](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595/20 "2010-04-29T16:07:37Z")

</div>

On Thursday, 29.04.10 at 17:58, Igor S. wrote:

> BTW, if the patch will resolve the issue, could you please post full  
> ./configure ouput ?

Output of  
./configure --without-http\_rewrite\_module --without-http-cache  
:

checking for OS

- SCO\_SV 3.2 i386  
checking for C compiler … found
- using GNU C compiler
- gcc version: 3.3.1  
checking for gcc -pipe switch … found  
checking for gcc builtin atomic operations … not found  
checking for gcc variadic macros … found  
checking for C99 variadic macros … found  
checking for unistd.h … found  
checking for inttypes.h … not found  
checking for limits.h … found  
checking for sys/filio.h … not found  
checking for sys/param.h … found  
checking for sys/mount.h … found  
checking for sys/statvfs.h … found  
checking for sys/bitypes.h … found  
checking for crypt.h … found  
checking for SCO\_SV specific features  
checking for nobody group … not found  
checking for nogroup group … found  
checking for poll() … found  
checking for /dev/poll … not found  
checking for kqueue … not found  
checking for crypt() … found  
checking for F\_READAHEAD … not found  
checking for posix\_fadvise() … not found  
checking for O\_DIRECT … not found  
checking for F\_NOCACHE … not found  
checking for directio() … not found  
checking for statfs() … not found  
checking for statvfs() … found  
checking for dlopen() … found  
checking for sched\_yield() … found  
checking for zlib library … found  
creating objs/Makefile  
checking for int size … 4 bytes  
checking for long size … 4 bytes  
checking for long long size … 8 bytes  
checking for void \* size … 4 bytes  
checking for int64\_t … int64\_t not found, long long used  
checking for uint64\_t … uint64\_t not found u\_int64\_t not found,  
unsigned long long used  
checking for int32\_t … found  
checking for uint32\_t … uint32\_t not found, u\_int32\_t used  
checking for sig\_atomic\_t … found  
checking for sig\_atomic\_t size … 4 bytes  
checking for socklen\_t … socklen\_t not found, int used  
checking for in\_addr\_t … in\_addr\_t not found uint32\_t not found,  
u\_int32\_t used  
checking for in\_port\_t … in\_port\_t not found, u\_short used  
checking for rlim\_t … found  
checking for uintptr\_t … uintptr\_t not found , uint32\_t used  
checking for system endianess … little endianess  
checking for size\_t size … 4 bytes  
checking for off\_t size … 4 bytes  
checking for time\_t size … 4 bytes  
checking for setproctitle() … not found  
checking for pread() … not found  
checking for pwrite() … not found  
checking for strerror\_r() … not found  
checking for gnu style strerror\_r() … not found  
checking for sys\_errlist … not found  
checking for localtime\_r() … found  
checking for posix\_memalign() … not found  
checking for memalign() … found  
checking for mmap(MAP\_ANON|MAP\_SHARED) … not found  
checking for mmap(“/dev/zero”, MAP\_SHARED) … found  
checking for System V shared memory … found  
checking for struct msghdr.msg\_control … found  
checking for ioctl(FIONBIO) … not found  
checking for struct tm.tm\_gmtoff … not found  
checking for struct dirent.d\_namlen … not found  
checking for struct dirent.d\_type … not found

Configuration summary

- PCRE library is not used
- OpenSSL library is not used
- md5 library is not used
- sha1 library is not used
- using system zlib library

nginx path prefix: “/usr/local/nginx”  
nginx binary file: “/usr/local/nginx/sbin/nginx”  
nginx configuration prefix: “/usr/local/nginx/conf”  
nginx configuration file: “/usr/local/nginx/conf/nginx.conf”  
nginx pid file: “/usr/local/nginx/logs/nginx.pid”  
nginx error log file: “/usr/local/nginx/logs/error.log”  
nginx http access log file: “/usr/local/nginx/logs/access.log”  
nginx http client request body temporary files: “client\_body\_temp”  
nginx http proxy temporary files: “proxy\_temp”  
nginx http fastcgi temporary files: “fastcgi\_temp”

[Next page](https://www.ruby-forum.com/t/defining-uint64-t-etc-during-configure/187595.md?page=2)
