gprofng: Use prototype to call libc functions
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Fri, 17 Mar 2023 00:19:23 +0000 (17:19 -0700)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Mon, 20 Mar 2023 01:03:58 +0000 (18:03 -0700)
commitde8e70596896cc9f85498a9981196ebc4465172e
tree2bac4cf6bb0fd153bc943a18fc0f4deef1e921a2
parent2f5dea45584c09f23702f887b1ecbe16cf16ba05
gprofng: Use prototype to call libc functions

libcollector may not link against libC.
We use dlsym() to get a function from libc.
In some files, pointers to these functions do not have prototypes.
I also moved the shared definitions to libcollector/collect.h.

gprofng/ChangeLog
2023-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

libcollector/collector.c: Add prototypes.
libcollector/dispatcher.c: Likewise.
libcollector/heaptrace.c: Likewise.
libcollector/iotrace.c: Likewise.
libcollector/linetrace.c: Likewise.
libcollector/mmaptrace.c: Likewise.
libcollector/synctrace.c: Likewise.
libcollector/collector.h: Add CALL_REAL(), NULL_PTR(), and DBG_LT.
gprofng/libcollector/collector.c
gprofng/libcollector/collector.h
gprofng/libcollector/dispatcher.c
gprofng/libcollector/heaptrace.c
gprofng/libcollector/iotrace.c
gprofng/libcollector/linetrace.c
gprofng/libcollector/mmaptrace.c
gprofng/libcollector/synctrace.c