This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
There is a problem when I compile the case with -lcrypt
- From: Cui Bixuan <cuibixuan at huawei dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: <zhanyongming at huawei dot com>, Li Jinyue <lijinyue at huawei dot com>, Ji Qin <jiqin dot ji at huawei dot com>
- Date: Fri, 4 Sep 2015 15:40:41 +0800
- Subject: There is a problem when I compile the case with -lcrypt
- Authentication-results: sourceware.org; auth=none
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?