Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting long long in 32-bit host #2

Open
roytam1 opened this issue May 16, 2012 · 1 comment
Open

supporting long long in 32-bit host #2

roytam1 opened this issue May 16, 2012 · 1 comment

Comments

@roytam1
Copy link

roytam1 commented May 16, 2012

I'm getting error when compiling following code in ubuntu 10.04 LTS:

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>

int main() {
        struct stat b1, b2;
        stat("/bin",&b1);
        stat("/usr",&b2);

        if(b1.st_dev == b2.st_dev) {
                if(b1.st_ino == b2.st_ino) {
                        printf("/bin and /usr is same i-node\n");
                }
        }
        return 0;
}

and I got

stattest.c:10: operands of == have illegal types `__rlim64_t' and `__rlim64_t'

which typedefs as __u_quad_t which is "long long"(64-bit integer) type:

bits/types.h:typedef unsigned long int __u_quad_t;
@alexfru
Copy link

alexfru commented Jul 16, 2016

There's no long long type in ANSI C, which is what LCC implements. If that's the problem you're having, you need a library and headers that are compatible with ANSI C.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants