mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-26 08:00:09 +08:00
OpenBSD: use portable strtoll instead of strtonum to allow cross-compilation test
This commit is contained in:
parent
4d254312be
commit
00d467d44c
12
libtcc.c
12
libtcc.c
@ -1111,7 +1111,7 @@ ST_FUNC char *tcc_openbsd_library_soversion(TCCState *s, const char *libraryname
|
||||
{
|
||||
DIR *dirp;
|
||||
struct dirent *dp;
|
||||
const char *e;
|
||||
char *e;
|
||||
char **libpaths, *t, *u, *v;
|
||||
char soname[1024];
|
||||
long long maj, min, tmaj, tmin;
|
||||
@ -1134,16 +1134,18 @@ ST_FUNC char *tcc_openbsd_library_soversion(TCCState *s, const char *libraryname
|
||||
u = strrchr(t, '.');
|
||||
*u = '\0';
|
||||
|
||||
tmin = strtonum(u + 1, 0, LLONG_MAX, &e);
|
||||
if (e != NULL) {
|
||||
tmin = strtoll(u + 1, &e, 10);
|
||||
|
||||
if (*e != 0) {
|
||||
tcc_free(t);
|
||||
t = NULL;
|
||||
continue;
|
||||
}
|
||||
|
||||
v = strrchr(t, '.');
|
||||
tmaj = strtonum(v + 1, 0, LLONG_MAX, &e);
|
||||
if (e != NULL) {
|
||||
tmaj = strtoll(v + 1, &e, 10);
|
||||
|
||||
if (*e != 0) {
|
||||
tcc_free(t);
|
||||
t = NULL;
|
||||
continue;
|
||||
|
4
tccelf.c
4
tccelf.c
@ -2540,9 +2540,9 @@ static int elf_output_file(TCCState *s1, const char *filename)
|
||||
struct ro_inf roinf;
|
||||
ElfW(Phdr) *phdr;
|
||||
Section *strsec, *interp, *dynamic, *dynstr, *note = NULL;
|
||||
#ifndef ELF_OBJ_ONLY
|
||||
//#ifndef ELF_OBJ_ONLY
|
||||
struct ro_inf *roinf_use = NULL;
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
file_type = s1->output_type;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user