[sco.opendesktop] XmFileSelectionBox error found

ppaone@mabjab (Phil Paone) (08/28/90)

I found what I thought was a bug in the XmFileSelection box widget under 
SCO UNIX 3.2.1.  It turns out that the bug was not in the motif code, but
in the dirent routines.  The bug was that the filenames showing up in the selection
window where missing the first two characters from the filenames.

Sure enough, this is what happened when I used dirent routines directly. 
So, if you want to use this widget, the best solution I saw was to get
the
PD dirent routines written by Douglas A. Gwyn, and is generally found in the
unix-pc archives.

Phil Paone
w

mikep@sco.COM (Mike Patnode) (08/30/90)

In article <1990Aug28.120308.411@mabjab> ppaone@mabjab (Phil Paone) writes:
>I found what I thought was a bug in the XmFileSelection box widget under 
>SCO UNIX 3.2.1.  It turns out that the bug was not in the motif code, but
>in the dirent routines.  The bug was that the filenames showing up in the selection
>window where missing the first two characters from the filenames.

You are probably incorrectly linking with -lx.  You should use the
directory routines in libc.a.  If you need to link with -lx for
some xenix compatibility use the following link line:

	-lXm -lXt -lX11 -lsocket -lmalloc -lc -lx

If you don't need -lx, don't use it.


-- 
Mike Patnode					The Santa Cruz Operation 
SCO Software Engineer				400 Encinal Street
{ucscc,uunet}!sco!mikep	 mikep@sco.COM  	P.O. Box 1900
(408) 458-1422                                  Santa Cruz, CA 95061

rick@tetrauk.UUCP (Rick Jones) (08/30/90)

In article <1990Aug28.120308.411@mabjab> ppaone@mabjab (Phil Paone) writes:
>I found what I thought was a bug in the XmFileSelection box widget under 
>SCO UNIX 3.2.1.  It turns out that the bug was not in the motif code, but
>in the dirent routines.  The bug was that the filenames showing up in the selection
>window where missing the first two characters from the filenames.
>
>Sure enough, this is what happened when I used dirent routines directly. 
>So, if you want to use this widget, the best solution I saw was to get
>the
>PD dirent routines written by Douglas A. Gwyn, and is generally found in the
>unix-pc archives.

A colleague of mine ran into this some while ago in a different context, and
it's due to conflicts between different versions of the opendir() family of
routines.  SCO Unix attempts to support both versions via different libraries.

I can't remember which is the correct combination, and I don't have time to
find out now, but if you hunt around the standard libraries you'll find
different opendir(), readdir() etc.  One version may be in libc itself.  With a
little experiment of which libraries to use at link time it should come out
right.

Sorry this is vague (I wasn't personally up to my neck in this one), but it
might help if you want to use the standard libraries.

-- 
Rick Jones					You gotta stand for something
Tetra Ltd.  Maidenhead, Berks			Or you'll fall for anything
rick@tetrauk.uucp (...!ukc!tetrauk.uucp!rick)	     - John Cougar Mellencamp