Compare commits

...

3 Commits

Author SHA1 Message Date
Hongcai Deng eaf7645ffc
Merge a16fde8070 into de1e9e7ec4 2025-03-23 21:10:58 +08:00
YuQing de1e9e7ec4 add function fc_compare_int64_ptr 2025-03-18 08:42:39 +08:00
Hongcai Deng a16fde8070 fix: compile error when build .so using .a
```
src/libfastcommon.a(hash.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
```

env: Ubuntu 14.04, gcc 4.8
2017-01-29 14:20:18 +08:00
4 changed files with 10 additions and 2 deletions

View File

@ -1,6 +1,7 @@
Version 1.77 2025-02-03 Version 1.77 2025-03-18
* impl. shorten_path for /./ and /../ * impl. shorten_path for /./ and /../
* add function fc_compare_int64_ptr
Version 1.76 2025-01-27 Version 1.76 2025-01-27
* get_mounted_filesystems act as program df * get_mounted_filesystems act as program df

View File

@ -66,7 +66,7 @@ libfastcommon.a: $(FAST_STATIC_OBJS)
.c: .c:
$(COMPILE) -o $@ $< $(FAST_STATIC_OBJS) $(LIB_PATH) $(INC_PATH) $(COMPILE) -o $@ $< $(FAST_STATIC_OBJS) $(LIB_PATH) $(INC_PATH)
.c.o: .c.o:
$(COMPILE) -c -o $@ $< $(INC_PATH) $(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
.c.lo: .c.lo:
$(COMPILE) -c -fPIC -o $@ $< $(INC_PATH) $(COMPILE) -c -fPIC -o $@ $< $(INC_PATH)
install: install:

View File

@ -4362,3 +4362,8 @@ int fc_itoa(int64_t n, char *buff)
} }
return (start - buff) + len; return (start - buff) + len;
} }
int fc_compare_int64_ptr(const int64_t *n1, const int64_t *n2)
{
return fc_compare_int64(*n1, *n2);
}

View File

@ -777,6 +777,8 @@ int set_run_by(const char *group_name, const char *username);
*/ */
int cmp_by_ip_addr_t(const void *p1, const void *p2); int cmp_by_ip_addr_t(const void *p1, const void *p2);
int fc_compare_int64_ptr(const int64_t *n1, const int64_t *n2);
/** parse bytes /** parse bytes
* parameters: * parameters:
* pStr: the string to parse * pStr: the string to parse