This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

There is a problem when I compile the case with -lcrypt


Now, I have a testcase for testing strtol function:

#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <assert.h>
#include <errno.h>

int main() {
        char *c, *s;
        long int i;

        s="9223372036854775807";
        strtol(s, &c, 0);

        printf("errno=%d\n",errno);

        return 0;
}

Then I compile and run it in arm64 system:

aarch64-linux-gnu-gcc test.c -o test
aarch64-linux-gnu-gcc test.c -o test-1 -lcrypt

./test
errno=0

./test-1
errno=2

I don't know why? Is this a problem?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]