[AD] FreeBSD added to os_type

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Since I have a FreeBSD box here, I thought I'd do it: FreeBSD (as of
FreeBSD 4.1.1-STABLE #2: Fri Oct 27 10:37:39 BST 2000), has uname,
and a test shows that the sysname field holds *surprise* "FreeBSD".

Note that I don't have Allegro running on BSD (I'm just telnetting
to such a box, so what I compiled is just the bit of code I changed
taken out from usystem.c). So the *actual* lib itself was not tested,
but it is simple enough to not have been busted from my example to
allegro (famous last words :))


Index: include/allegro.h
===================================================================
RCS file: /cvsroot/alleg/allegro/include/allegro.h,v
retrieving revision 1.35
diff -r1.35 allegro.h
97a98
> #define OSTYPE_FREEBSD     AL_ID('F','B','S','D')
Index: src/unix/usystem.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/unix/usystem.c,v
retrieving revision 1.4
diff -r1.4 usystem.c
126a127,129
>       else if (!strcmp(utsn.sysname, "FreeBSD")) {
>           os_type = OSTYPE_FREEBSD;
>       }

-- 
Lyrian 



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/