These function were made to fit in an ETL software called Datastage (by IBM); So i didn't developed these in a C-like view, nor in a C++ view.
I made a little of mixup between C and C++, maybe in the future I will convert this in full C++.
This code was lately compiled with the same compiler used in Datastage (v. 11.5.2):
g++ -c -O -fPIC -Wno-deprecated -m64 -mtune=generic -mcmodel=small