The right menus are installed on little/big endian machines

This commit is contained in:
Michiel Broek 2002-07-26 21:12:19 +00:00
parent b2bb019342
commit 34b245dab8
4 changed files with 24 additions and 24 deletions

View File

@ -60,6 +60,9 @@ v0.35.03 06-Jul-2002
The bbsdoor.sh and rundoor.sh scripts are now only installed
if they were not installed before.
examples:
With the aid of a little utility (endian) the right menus are
now installed on little or big endian machines.
v0.35.02 22-Jun-2002 - 06-Jul-2002

3
TODO
View File

@ -142,6 +142,3 @@ mbsetup:
Fileecho groups <=> Newfile reports
Fileecho groups <=> BBS Areas
install:
U: On RedHat 7.3 the big-endian menus are installed.

View File

@ -29,21 +29,17 @@ install: all
echo "${INSTALL} -c -o ${OWNER} -g ${GROUP} -m 0644 footer.txt ${ETCDIR}" ; \
fi
@if [ ! -f ${PREFIX}/english/menus/main.mnu ]; then \
if [ "${HOSTTYPE}" = "i386" ] || [ "${MACHTYPE}" = "i386" ]; then \
tar xfC menus-le.tar ${PREFIX}/english/menus ; \
echo "Installing default english menus for a Little-Endian (i386) system" ; \
else \
tar xfC menus-be.tar ${PREFIX}/english/menus ; \
echo "Installing default english menus for a Big-Endian (Alpha/Sparc etc.) system" ; \
fi \
tar xfC menus-`./endian`.tar ${PREFIX}/english/menus ; \
echo "tar xfC menus-`./endian`.tar ${PREFIX}/english/menus" ; \
echo "Installed default english menus" ; \
fi
@if [ ! -f ${PREFIX}/english/txtfiles/main.ans ]; then \
tar xfC txtfiles.tar ${PREFIX}/english/txtfiles ; \
echo "Installing default english txtfiles" ; \
echo "Installed default english txtfiles" ; \
fi
@if [ ! -f ${PREFIX}/english/macro/html.tic ]; then \
tar xfC templates.tar ${PREFIX}/english/macro ; \
echo "Installing default english macro files" ; \
echo "Installed default english macro files" ; \
fi
clean:
@ -52,7 +48,7 @@ clean:
filelist: Makefile
BASE=`pwd`; \
BASE=`basename $${BASE}`; \
(for f in ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist
(for f in ${SRCS} ${HDRS} ${OTHER} ;do echo ${PACKAGE}-${VERSION}/$${BASE}/$$f; done) >filelist
depend:
@rm -f Makefile.bak; \

View File

@ -36,20 +36,24 @@
int main(void)
{
/*
* First test BYTE_ORDER
*/
if (BYTE_ORDER == 1234) {
printf("le");
} else if (BYTE_ORDER == 4321) {
printf("be");
} else {
/*
* If it failed do a simple CPU test
*/
#ifdef __i386__
printf("le");
printf("le");
#else
printf("be");
printf("be");
#endif
}
#ifdef __BIG_ENDIAN
printf("__BIG_ENDIAN %d\n", __BIG_ENDIAN);
#endif
#ifdef BIG_ENDIAN
printf("BIG_ENDIAN %d\n", BIG_ENDIAN);
#endif
printf("BYTE_ORDER %d\n", BYTE_ORDER);
return 0;
return 0;
}