Frank Lahm | 5 Jan 2009 09:36

Add tags target to to sys/solaris/Makefile.in

Patch attached.

-Frank
Attachment (patch): application/octet-stream, 431 bytes
------------------------------------------------------------------------------
_______________________________________________
Netatalk-devel mailing list
Netatalk-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netatalk-devel
Gavin Reid | 5 Jan 2009 10:04

Greetings & Solaris 10

Greetings ,
I was trying to configure 2.0.4 on Soalris 10 but having some issues

Solaris 10 update 6 on sparc compiles without issue

intel however is a different matter :

gcc -D__svr4__ -DSOLARIS -I../../sys/generic -I.. -DHAVE_CONFIG_H  - 
I../../include -I../netatalk -I../.. -m64 -D_KERNEL -Wall -Wstrict- 
prototypes   -c -o tpi.o tpi.c
In file included from tpi.c:23:
../netatalk/endian.h:120: warning: function declaration isn't a  
prototype
../netatalk/endian.h:120: error: conflicting types for 'ntohs'
../netatalk/endian.h:120: note: an argument type that has a default  
promotion can't match an empty parameter name list declaration
/usr/include/sys/byteorder.h:72: error: previous declaration of  
'ntohs' was here
../netatalk/endian.h:120: error: conflicting types for 'ntohs'
../netatalk/endian.h:120: note: an argument type that has a default  
promotion can't match an empty parameter name list declaration
/usr/include/sys/byteorder.h:72: error: previous declaration of  
'ntohs' was here
../netatalk/endian.h:120: warning: function declaration isn't a  
prototype
../netatalk/endian.h:120: error: conflicting types for 'htons'
../netatalk/endian.h:120: note: an argument type that has a default  
promotion can't match an empty parameter name list declaration
/usr/include/sys/byteorder.h:70: error: previous declaration of  
'htons' was here
(Continue reading)

Frank Lahm | 5 Jan 2009 11:30

Re: Greetings & Solaris 10

Hi Gavin,

2009/1/5 Gavin Reid <poshpaws <at> swissunixsupport.com>:
> I was trying to configure 2.0.4 on Soalris 10 but having some issues
> Solaris 10 update 6 on sparc compiles without issue
> intel however is a different matter :

There is some cruft in sys/netatalk/endian.h. I have a highly patched
netatak head version building and running on opensolaris on x86_64.
AFAIR patching endian.h should be sufficient for 2.0.4beta2. Can you
test this and report back?

 <at> Andrew: can you check the patch? I just removed the obsolescent
declaration of ntohs... altogether.

Regards
-Frank
Attachment (patch): application/octet-stream, 616 bytes
------------------------------------------------------------------------------
_______________________________________________
Netatalk-devel mailing list
Netatalk-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netatalk-devel
Gavin Reid | 5 Jan 2009 16:06

Re: Greetings & Solaris 10

I can confirm that 2.0.4beta2 builds with that patch

thanks



I happy to hang around on this list and can test releases etc if another pair of hands is required


Gav


On Jan 5, 2009, at 11:30 AM, Frank Lahm wrote:

Hi Gavin,

2009/1/5 Gavin Reid <poshpaws <at> swissunixsupport.com>:
I was trying to configure 2.0.4 on Soalris 10 but having some issues
Solaris 10 update 6 on sparc compiles without issue
intel however is a different matter :

There is some cruft in sys/netatalk/endian.h. I have a highly patched
netatak head version building and running on opensolaris on x86_64.
AFAIR patching endian.h should be sufficient for 2.0.4beta2. Can you
test this and report back?

<at> Andrew: can you check the patch? I just removed the obsolescent
declaration of ntohs... altogether.

Regards
-Frank
<patch>

------------------------------------------------------------------------------
_______________________________________________
Netatalk-devel mailing list
Netatalk-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netatalk-devel
Andrew Morgan | 5 Jan 2009 21:34

Re: Add tags target to to sys/solaris/Makefile.in

On Mon, 5 Jan 2009, Frank Lahm wrote:

> Patch attached.

What does a "tags" target do?

 	Andy

------------------------------------------------------------------------------
Andrew Morgan | 6 Jan 2009 00:39

Re: Greetings & Solaris 10

On Mon, 5 Jan 2009, Frank Lahm wrote:

> Hi Gavin,
>
> 2009/1/5 Gavin Reid <poshpaws <at> swissunixsupport.com>:
>> I was trying to configure 2.0.4 on Soalris 10 but having some issues
>> Solaris 10 update 6 on sparc compiles without issue
>> intel however is a different matter :
>
> There is some cruft in sys/netatalk/endian.h. I have a highly patched
> netatak head version building and running on opensolaris on x86_64.
> AFAIR patching endian.h should be sufficient for 2.0.4beta2. Can you
> test this and report back?
>
>  <at> Andrew: can you check the patch? I just removed the obsolescent
> declaration of ntohs... altogether.

I'm not very familiar with the original code in endian.h here:

#else /* mips && KERNEL */

#if !( defined( sun ) && defined( i386 ))
unsigned short ntohs(), htons();
unsigned int  ntohl(), htonl();
#endif /* ! ( sun && i386 ) */

The comment indicates this might be there for the mips platform?  Maybe we 
should leave the definitions in there and just change "sun" to "SOLARIS"?

 	Andy

------------------------------------------------------------------------------
Frank Lahm | 6 Jan 2009 09:08

Re: Greetings & Solaris 10

Hi Andrew,

2009/1/6 Andrew Morgan <morgan <at> orst.edu>:
> On Mon, 5 Jan 2009, Frank Lahm wrote:
>>  <at> Andrew: can you check the patch? I just removed the obsolescent
>> declaration of ntohs... altogether.
>
> I'm not very familiar with the original code in endian.h here:
>
> #else /* mips && KERNEL */
>
> #if !( defined( sun ) && defined( i386 ))
> unsigned short ntohs(), htons();
> unsigned int  ntohl(), htonl();
> #endif /* ! ( sun && i386 ) */
> The comment indicates this might be there for the mips platform?

No. The if clause above is for mips && KERNEL.

> Maybe we
> should leave the definitions in there and just change "sun" to "SOLARIS"?

Finally sorted it out: we're compiling for x86_64 so i386 is not defined. Fix:

#if !( defined( sun ) && (defined( i386 ) || defined(__x86_64)))

Works for gcc and cc.

-Frank

------------------------------------------------------------------------------
Andrew Morgan | 6 Jan 2009 21:01

Re: Add tags target to to sys/solaris/Makefile.in

On Mon, 5 Jan 2009, Frank Lahm wrote:

> Patch attached.
>
> -Frank

Committed to CVS.

 	Andy

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
Andrew Morgan | 6 Jan 2009 21:05

Re: Greetings & Solaris 10

On Tue, 6 Jan 2009, Frank Lahm wrote:

> Finally sorted it out: we're compiling for x86_64 so i386 is not defined. Fix:
>
> #if !( defined( sun ) && (defined( i386 ) || defined(__x86_64)))
>
> Works for gcc and cc.

Committed to CVS.

 	Andy

------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
Frank Lahm | 9 Jan 2009 10:38

More Solaris 10 stuff

Hi,

these files:

etc/papd/main.c
etc/papd/lp.c
etc/atalkd/main.c

... #include stuff from /usr/ucbinclude which on opensolaris is not
present anymore. SUN tells us [1]. There are two choices how we could
procede:
- remove the #ifdef check for solaris and just include
"/usr/include/sys/stat.h". This is likely to break building on older
Solaris releases.
- add autoconf check for the presence of /usr/ucbinclude/sys/stat.h
and fall back to /usr/include/sys/stat.h if not present

I'd prefer to pull the plug and remove the #ifdef stuff. Patched that
way it builds fine on opensolaris.

-Frank

[1] http://developers.sun.com/solaris/articles/portingtosolaris.html:
"For historical reasons, the Solaris OS also provides include files
and runtime libraries compatible with SunOS 4.X, in /usr/ucbinclude
and /usr/ucblib. For new ports to the Solaris OS, these ucb functions
should be avoided in preference to the normal system routine."
Index: etc/atalkd/main.c
===================================================================
RCS file: /var/cvsroot/netatalk/etc/atalkd/main.c,v
retrieving revision 1.1.1.1
diff -u -w -b -r1.1.1.1 main.c
--- etc/atalkd/main.c   5 Nov 2008 11:46:10 -0000       1.1.1.1
+++ etc/atalkd/main.c   8 Jan 2009 16:35:25 -0000
 <at>  <at>  -11,11 +12,7  <at>  <at> 

 #include <sys/param.h>
 #include <sys/socket.h>
-#if defined( sun ) && defined( __svr4__ )
-#include </usr/ucbinclude/sys/file.h>
-#else /* sun __svr4__ */
 #include <sys/file.h>
-#endif /* sun __svr4__ */
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/ioctl.h>
Index: etc/papd/lp.c
===================================================================
RCS file: /var/cvsroot/netatalk/etc/papd/lp.c,v
retrieving revision 1.1.1.2
diff -u -w -b -r1.1.1.2 lp.c
--- etc/papd/lp.c       17 Nov 2008 09:08:50 -0000      1.1.1.2
+++ etc/papd/lp.c       8 Jan 2009 16:35:24 -0000
 <at>  <at>  -54,11 +55,7  <at>  <at> 
 #include <unistd.h>
 #endif /* HAVE_UNISTD_H */

-#if defined( sun ) && defined( __svr4__ )
-#include </usr/ucbinclude/sys/file.h>
-#else /* sun && __svr4__ */
 #include <sys/file.h>
-#endif /* sun && __svr4__ */
 #include <sys/un.h>
 #include <netinet/in.h>
 #undef s_net
Index: etc/papd/main.c
===================================================================
RCS file: /var/cvsroot/netatalk/etc/papd/main.c,v
retrieving revision 1.1.1.2
diff -u -w -b -r1.1.1.2 main.c
--- etc/papd/main.c     17 Nov 2008 09:08:50 -0000      1.1.1.2
+++ etc/papd/main.c     8 Jan 2009 16:35:25 -0000
 <at>  <at>  -14,11 +15,7  <at>  <at> 
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/uio.h>
-#if defined( sun ) && defined( __svr4__ )
-#include </usr/ucbinclude/sys/file.h>
-#else /* sun && __svr4__ */
 #include <sys/file.h>
-#endif /* sun && __svr4__ */
 #include <sys/socket.h>
 #include <atalk/logger.h>
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Netatalk-devel mailing list
Netatalk-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/netatalk-devel

Gmane