summaryrefslogtreecommitdiff
path: root/test/stat/stat.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-01-24 19:21:30 +0000
committerEric Andersen <andersen@codepoet.org>2003-01-24 19:21:30 +0000
commitf48557f942bf816a741a85135bf72bffea53559e (patch)
tree91653ce470fdb4a11d6aa574cdabe4f42b8b090d /test/stat/stat.c
parent1eaf39576819e5d3c75264bb6600055f905c1808 (diff)
Stick some evil casts in to make sure this works regardless
of the underlying data types.
Diffstat (limited to 'test/stat/stat.c')
-rw-r--r--test/stat/stat.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/stat/stat.c b/test/stat/stat.c
index 9de2b3ef6..c1ce4b8b3 100644
--- a/test/stat/stat.c
+++ b/test/stat/stat.c
@@ -6,19 +6,19 @@ void print_struct_stat(char *msg, struct stat *s)
{
printf("%s\n", msg);
/* The casts are because glibc thinks it's cool */
- printf("device : 0x%x\n",(unsigned int)s->st_dev);
- printf("inode : %d\n",(int)s->st_ino);
- printf("mode : 0x%x\n",s->st_mode);
- printf("nlink : %d\n",s->st_nlink);
- printf("uid : %d\n",s->st_uid);
- printf("gid : %d\n",s->st_gid);
- printf("rdev : 0x%x\n",(unsigned int)s->st_rdev);
- printf("size : %ld\n",s->st_size);
- printf("blksize : %ld\n",s->st_blksize);
- printf("blocks : %ld\n",s->st_blocks);
- printf("atime : %ld\n",s->st_atime);
- printf("mtime : %ld\n",s->st_mtime);
- printf("ctime : %ld\n",s->st_ctime);
+ printf("device : 0x%llx\n",(long long)s->st_dev);
+ printf("inode : %lld\n", (long long)s->st_ino);
+ printf("mode : 0x%llx\n",(long long)s->st_mode);
+ printf("nlink : %lld\n", (long long)s->st_nlink);
+ printf("uid : %lld\n", (long long)s->st_uid);
+ printf("gid : %lld\n", (long long)s->st_gid);
+ printf("rdev : 0x%llx\n",(long long)s->st_rdev);
+ printf("size : %lld\n", (long long)s->st_size);
+ printf("blksize : %lld\n", (long long)s->st_blksize);
+ printf("blocks : %lld\n", (long long)s->st_blocks);
+ printf("atime : %lld\n", (long long)s->st_atime);
+ printf("mtime : %lld\n", (long long)s->st_mtime);
+ printf("ctime : %lld\n", (long long)s->st_ctime);
}
int main(int argc,char **argv)