samba shares access issue in Solaris from a MT program

Narayana Pattipati narayana.pattipati at wipro.com
Wed Oct 27 16:21:29 GMT 2004


Hi Richard, Dave,

Thanks for the all the help regarding this issue.

I was building samba with this change to configure.in in Solaris 10 and
found a small issue there in configure.in. In Solaris 10, the CPPFLAGS,
LDFLAGS are not exported at all while building. I figured out the
solution to the issue. 

The section of configure.in where we are adding D_REENTRANT and -lthread
is something like this: 
  case "$host_os" in 
     .......... 
     *solaris*) 
        AC_DEFINE(SYSV, 1, [Whether to enable System V compatibility]) 
        case `uname -r` in 
           5.0*|5.1*|5.2*|5.3*|5.5*) 
               AC_MSG_RESULT([no large file support]) 
           5.*) 
               AC_MSG_RESULT([enabling large file support]) 
               ....... 
               ........ 
               CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_REENTRANT" 

But, since uname -r 5.10 matches regex 5.1* in the previous statement,
condition returns there itself and the CPPFLAGS are not getting exported
in Solaris 10 builds. This problem would not be there in Solaris 8, 9.

Following small change would solve the issue.

--- configure.in.org    2004-10-27 14:53:16.538561000 +0530
+++ configure.in        2004-10-27 17:01:29.705078000 +0530
@@ -438,7 +438,7 @@ case "$host_os" in
        *solaris*)
                AC_DEFINE(SYSV, 1, [Whether to enable System V
compatibility])
                case `uname -r` in
-  5.0*|5.1*|5.2*|5.3*|5.5*)
+  5.0|5.0.*|5.1|5.1.*|5.2|5.2.*|5.3|5.3.*|5.5|5.5.*)
              AC_MSG_RESULT([no large file support])
              ;;
   5.*)

If the change is OK, could you please commit it?

Thanks,
Narayana

On Tue, 2004-09-28 at 23:10, Richard Sharpe wrote:
> On Tue, 28 Sep 2004, Sean McGrath - Sun Microsystems Ireland wrote:
> 
> >
> >  Really needs the change in configure/autoconf, something like:
> >
> > $ diff -u configure configure.new
> > --- configure   Wed Sep 22 16:29:40 2004
> > +++ configure.new       Tue Sep 28 17:35:10 2004
> > @@ -3553,7 +3553,8 @@
> >                                 rm -fr conftest.c
> >                                 case "$ac_cv_gcc_compiler_version_number" in
> >                                         *"gcc version 2.6"*|*"gcc version 2.7"*)
> > -                                               CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
> > +                                               CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE -D_REENTRANT"
> > +                                               LDFLAGS="$LDFLAGS -lthread"
> >
> >  cat >>confdefs.h <<\_ACEOF
> >  #define _LARGEFILE64_SOURCE 1
> > @@ -3561,7 +3562,8 @@
> >
> >                                                 ;;
> >                                         *)
> > -                                               CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
> > +                                               CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT"
> > +                                               LDFLAGS="$LDFLAGS -lthread"
> >
> >  cat >>confdefs.h <<\_ACEOF
> >  #define _LARGEFILE64_SOURCE 1
> > @@ -3575,7 +3577,8 @@
> >                                                 ;;
> >                                 esac
> >                         else
> > -                               CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
> > +                               CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT"
> > +                               LDFLAGS="$LDFLAGS -lthread"
> >
> >  cat >>confdefs.h <<\_ACEOF
> >  #define _LARGEFILE64_SOURCE 1
> >
> >
> > Perhaps.  Though as Dave suggests, the configure guru can correct this :)
> 
> OK, I believe I know where to fix this in configure.in, but, remind me
> again why we need to do this?
> 
> In particular, why would we restrict this to Solaris?
> 
> Regards
> -----
> Richard Sharpe, rsharpe[at]richardsharpe.com, rsharpe[at]samba.org,
> sharpe[at]ethereal.com, http://www.richardsharpe.com




Confidentiality Notice 

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately
and destroy all copies of this message and any attachments.


More information about the samba-technical mailing list