It _probably_ works to just pass free(ptr) another two arguments, but
compilers don't like this kind of sloppiness anymore.
The call site only expects this function to free the first value,
ignoring the other two, so model that in the local wrapper function.
From a diff file provided by Mariusz Zynel:
Every time, every dt program gives that error on its
start. t_optmgmt() is called once in _tt_tli_set_nodelay(), as the
name says, to set TCP_NODELAY option for ToolTalk connections.
The current behavior is not standards conformant, and will cause the
format operation to result in empty text as glibc fails any calls to
getwc against a narrow stream with WEOF. Additionally, narrow write
operations against a wide stream appears to bypass the buffer, causing
incorrect formatting results.
Fix this by changing all write operations against the reformatted output
file stream to be wide operations, and reopening the temporary input
file before performing any wide read operations.
This shouldn't change behavior (or even object code) at all because
those assignments are all without effect. Removing that code removes
noise which helps working with code analysis tools.
Some implementations (e.g. glibc) require that, while implementations
that are fine with 5 of them still work the same (just with one more
constant letter)
Fix many -Wint-conversion errors such as the example below, including
an aso atomics error.
connect.c:87:12: error: incompatible pointer to integer conversion initializing 'LONG' (aka 'int') with an expression of type 'void *' [-Wint-conversion]
DB_ADDR mdba = NULL; /* db address of current member record */
^ ~~~~
This has meant very little for a long time as configure.ac just
hardcoded these values depending on the current OS versions at the
time.
The only place where this is really 'needed' is XlationSvc.c in DtSvc
so that differences between locale specifications on various versions
of an OS can be accounted for. So for now, we just define those when
building DtSvc.
We could probably safely remove them as well with an update to the
Xlate locale DB to remove ancient cruft we don't care about anymore.
For various other modules, like dtlogin, dtsession, etc we just use
the code that was already being used due to the hardcoded values we've
had for the last 10-ish years.
OS_VERSION was used with a '#if defined(sun)', but since it was never
set anywhere it just omitted that block. If the block turns up to be
broken on sun systems, then someone will fix it properly.
Previously we would fail in some parts of the code if we did not have a
premade configuration, now we use any code that was marked as Linux, BSD and
Solaris as our basis in order to support building unknown Unix systems.