Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-02

Linux gid_t uid_t

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marco van de Voort

I noticed that somewhere since baseunix times Linux/glibc updated all basic types that were still 16-bit to 32-bit. FPC didn't notice it, since the x86 stat record is a typeless hack. However for e.g. the password functions this needs to be corrected.

Does sb know when this conversion happened ? *or* if you have a fairly old or 32-bit non x86 linux distro, try compiling + running the following program:

#include <sys/types.h>

int main()
{

  printf("%d %d %d",sizeof(uid_t),sizeof(gid_t),sizeof(mode_t));

}

It should print
4 4 4

Reply by email

ik
to Marco van de Voort

It does on my buntu amd64.

Ido

Marco van de Voort wrote 26 lines
I noticed that somewhere since baseunix times Linux/glibc updated all basic types that were still 16-bit to 32-bit. FPC didn't notice it, since the x86 stat record is a typeless hack. However for e.g. the password functions this needs to be corrected. Does sb know when this conversion happened ? *or* if you have a fairly old or 32-bit non x86 linux distro, try compiling + running the following program: #include <sys/types.h> int main() { printf("%d %d %d",sizeof(uid_t),sizeof(gid_t),sizeof(mode_t)); } It should print 4 4 4 _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email