Problems with compiler options
Alex Likwintsev
aliq at glasnet.ru
Sat Aug 30 01:28:56 GMT 1997
Hi, All!
I've compiled Samba recently and I've found that my Win95 box
and smbclient show UNIX shares as if they are empty.
I set DEBUGLEVEL=10 and put a lot of additional DEBUG
macro in Samba code.
It lookes like readdirname() cut off first two characters
from file names because of the strange behavior of readdir().
I've modified readdirname() to make it work by replacing
readdir() with readdir_r():
/***********************************************/
char *readdirname(void *p)
{
static union{
struct dirent dir;
char dummy[1024];
} buf;
if (!p) return(NULL);
if (readdir_r(p, &(buf.dir))==NULL )
return(NULL);
unix_to_dos(buf.dir.d_name, True);
#ifdef NEXT2
if (telldir(p) < 0) return(NULL);
#endif
return(buf.dir.d_name);
}
/***********************************************/
And it began to work properly.
But I'm not sure I've corrected all the other things
of this sort.
I think there must be some way to correct it without
surgery.
If anybody knows proper compiler options or some other
ways to correct strange behavoir of readdir(),
please mail to me.
My UNIX is SunOS 5.5.1, and I've compiled Samba
with SPARC C compiler ver 4.0.
I haven't changed CFLAGS setting in Makefile.
I've never had any other C compilers in my SUN box,
so I couldn't mix *.h files.
Thanks for any ideas.
Alex Likwintsev
aliq at glasnet.ru
More information about the samba
mailing list