[MDEV-23987] update of udf_example.c Created: 2020-10-19  Updated: 2023-10-12

Status: Open
Project: MariaDB Server
Component/s: Server
Fix Version/s: None

Type: Task Priority: Major
Reporter: Anel Husakovic Assignee: Anel Husakovic
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Make portable usage of functions,

bzero -> memset
strmov -> strcpy
#define strmov(a,b) stpcpy(a,b)

only mysql.h needed get rid of other includes,
get rid of warnings,

$ gcc -c udf_example.c -I../include -I../../builds/10.3/include -fPIC
udf_example.c:141:0: warning: "bzero" redefined
 #define bzero(a,b) memset(a,0,b)
In file included from ../include/my_sys.h:20:0,
                 from udf_example.c:134:
../include/m_string.h:60:0: note: this is the location of the previous definition
 # define bzero(A,B)             memset((A),0,(B))

update examples and example documentation in the code.



 Comments   
Comment by Vladislav Vaintroub [ 2020-10-19 ]

perhaps there are more of functions to cleanup. unportable/obsolete gethostbyname_r and friends, instead there are portable reentrant getaddrinfo/getnameinfo.

Generated at Thu Feb 08 09:26:35 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.