Kill off OSMAJORVERSION and OSMINORVERSION defines/cpp flags
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.
This commit is contained in:
@@ -2245,8 +2245,10 @@ int _DtXlateGetXlateEnv(
|
||||
809 = (int) (100.0 * atof("8.09"));
|
||||
===========================*/
|
||||
|
||||
#if !defined(OSMAJORVERSION) || !defined(OSMINORVERSION) || OSMAJORVERSION == 0
|
||||
#error OSMAJORVERSION and/or OSMINORVERSION not defined
|
||||
#if !defined(OSMAJORVERSION) && !defined(OSMINORVERSION)
|
||||
#warning "OSMAJORVERSION and OSMINORVERSION not defined, assuming 99.0:
|
||||
#define OSMAJORVERSION 99
|
||||
#define OSMINORVERSION 0
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) || defined(CSRG_BASED)
|
||||
|
||||
@@ -19,6 +19,35 @@ if SOLARIS
|
||||
libDtSvc_la_CPPFLAGS += -DNO_REGCOMP
|
||||
endif
|
||||
|
||||
# OSVERSION hackery. This database works by comparing a number
|
||||
# computed with the OS major/minor versions to determine appropriate
|
||||
# entries in the Xlocale DB. These are currently hardcoded per OS in
|
||||
# configure.ac. Well, no more. Now they will be hardcoded per OS
|
||||
# here - the only place where they are really needed currently, until
|
||||
# some time in the future when old and irrelevant entries are removed
|
||||
# from the DB and we won't need this at all.
|
||||
|
||||
if LINUX
|
||||
libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=4 -DOSMINORVERSION=15
|
||||
endif
|
||||
|
||||
if FREEBSD
|
||||
libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=10 -DOSMINORVERSION=0
|
||||
endif
|
||||
|
||||
if OPENBSD
|
||||
libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=6 -DOSMINORVERSION=2
|
||||
endif
|
||||
|
||||
if NETBSD
|
||||
libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=8 -DOSMINORVERSION=0
|
||||
endif
|
||||
|
||||
if SOLARIS
|
||||
libDtSvc_la_CPPFLAGS += -DOSMAJORVERSION=5 -DOSMINORVERSION=10
|
||||
endif
|
||||
|
||||
|
||||
libDtSvc_la_SOURCES = DtCodelibs/buf.C \
|
||||
DtCodelibs/buf.h \
|
||||
DtCodelibs/filegen.C \
|
||||
|
||||
Reference in New Issue
Block a user