Here is the patch for Solaris. It's built fine However I haven't done
any testing.
You may have to add -D_POSIX_PTHREAD_SEMANTICS in your Makefile to build it.
This is the build enviorment I 'm using right now.I'll try it on SPARC
later.It should be the same as x86.
gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld
--without-gnu-ld --enable-languages=c,c++ --enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
uname -a
SunOS pingpong 5.10 Generic_120012-14 i86pc i386 i86pc
P. A. Bagyenda wrote:
Hi,
would you kindly post a diff (unified) against latest CVS
On Dec 18, 2007, at 20:28, Steven Xie wrote:
I ported mbuni to Solaris 10 before. Just a few things needs to been
changed.
like below:
Paul Bagyenda wrote:
It would seem there are differences between Solaris and other
unices. Can you poke around, see if you have a C include file sys/
file.h and see if flock is defined? Solaris sometimes requires
certain macros to be defined before certain functions can be used.
We use mostly OSX and Linux, so these sort of errors can be expected!
Do let me know what you find, so we can see how best to resolve.
Paul.
On Dec 5, 2007 8:30 PM, Muthu Nedumaran <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED] >> wrote:
Thank you, Paul.
Made some progress - but there are still hickups. Here's a report :
1. I hit into the following error this time:
mms_msg.c: In function `fixup_date':
mms_msg.c:1354: error: too few arguments to function `asctime_r'
mms_msg.c:1355: error: too few arguments to function `ctime_r'
gmake[2]: *** [mms_msg.o] Error 1
I checked the man pages and it looks like asctime_r and ctime_r
needed an extra parameter in Solaris - the buffer size. I made
the changes as below:
if (!tm || asctime_r(tm, buf, sizeof(buf)) == NULL) /*
Then convert to ascii. If that fails...*/
ctime_r(&t, buf, sizeof(buf)); /*
.. just use current time. */
Using -D_POSIX_PTHREAD_SEMANTICS may have better portability.
2. Compilation passed the earlier stage and hit the
same O_RDWR.... problem in mms_queue.c file. I added #include
<fcntl.h> in this and continued...
3. I now get this error:
mms_util.c: In function `lockfile':
mms_util.c:820: error: `LOCK_NB' undeclared (first use in this
function)
mms_util.c:820: error: (Each undeclared identifier is reported
only once
mms_util.c:820: error: for each function it appears in.)
mms_util.c:823: error: `LOCK_EX' undeclared (first use in this
function)
gmake[2]: *** [mms_util.o] Error 1
gmake[2]: Leaving directory `/usr/local/mbuni/mmlib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/mbuni'
gmake: *** [all] Error 2
Looks like flock() is not supported in Solaris -- is this true?
flock is not desired under Solaris. I use fcntl instead.
Appreciate your help, again.
Regards,
MN.
----- Original Message ----
From: Paul Bagyenda <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>
To: Muthu Nedumaran <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
Cc: [email protected] <mailto:[email protected]>
Sent: Thursday, December 6, 2007 1:00:30 AM
Subject: Re: [Users] Compiling mbuni on Solaris 10 / x86
This could have to do with a missing include file. My guess is
fcntl.h was not included in the file. I've made that change on
CVS, do try that and see if it works fine.
P.
On Dec 5, 2007 7:37 PM, Muthu Nedumaran <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Hello,
I downloaded the cvs version of mbuni today (6 Dec, MYT).
I was able to do bootstrap and configure. However, when I do
a make (with gmake), I hit into problems. I've also tried the
1.3.0 version, the results are the same. Also the same with
'make' in Solaris.
I'm using GCC 3.4.3
Are there any extra steps, keystrokes I need to perform for
Solaris 10 / x86?
It went though clean on my Mac OS X machine, through.
Here's a fragment of the error thrown when did gmake:
Making all in mmlib
gmake[2]: Entering directory `/usr/local/mbuni-cvs-nov07/ mmlib'
gcc -DHAVE_CONFIG_H -I. -I.. -I../mmlib -I../mmlib -g -O2
-DSunOS=1 -D_FILE_OFFSET_BITS=64 -I/usr/local/include/kannel
-I/usr/local/gateway- 1.4.1 -g -O2 -fPIC
-D_FILE_OFFSET_BITS=64 -I/usr/include/libxml2 -MT mms_mmbox.o
-MD -MP -MF .deps/mms_mmbox.Tpo -c -o mms_mmbox.o mms_mmbox.c
mms_mmbox.c: In function `mkdf':
mms_mmbox.c:176: error: `O_RDWR' undeclared (first use in this
function)
mms_mmbox.c:176: error: (Each undeclared identifier is
reported only once
mms_mmbox.c:176: error: for each function it appears in.)
mms_mmbox.c:176: error: `O_CREAT' undeclared (first use in
this function)
mms_mmbox.c:176: error: `O_EXCL' undeclared (first use in this
function)
mms_mmbox.c: In function `open_mmbox_index':
mms_mmbox.c:199: error: `O_RDWR' undeclared (first use in this
function)
mms_mmbox.c:199: error: `O_CREAT' undeclared (first use in
this function)
mms_mmbox.c: In function `update_mmbox_index':
mms_mmbox.c:264: error: `O_RDWR' undeclared (first use in this
function)
mms_mmbox.c:264: error: `O_CREAT' undeclared (first use in
this function)
mms_mmbox.c:264: error: `O_EXCL' undeclared (first use in this
function)
mms_mmbox.c: In function `mms_mmbox_modmsg':
mms_mmbox.c:507: error: `O_RDWR' undeclared (first use in this
function)
mms_mmbox.c:507: error: `O_CREAT' undeclared (first use in
this function)
mms_mmbox.c:507: error: `O_TRUNC' undeclared (first use in
this function)
gmake[2]: *** [mms_mmbox.o] Error 1
gmake[2]: Leaving directory `/usr/local/mbuni-cvs-nov07/mmlib'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/local/mbuni-cvs-nov07'
gmake: *** [all] Error 2
Appreciate any pointers.
MN.
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.mbuni.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected] <mailto:[email protected]>
http://lists.mbuni.org/mailman/listinfo/users
------------------------------------------------------------------------
_______________________________________________
Users mailing list
[email protected]
http://lists.mbuni.org/mailman/listinfo/users
Index: mmlib/mms_queue.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmlib/mms_queue.c,v
retrieving revision 1.30
diff -r1.30 mms_queue.c
27a28,31
> #ifdef SunOS
> #include <strings.h>
> #include <fcntl.h>
> #endif
Index: mmlib/mms_util.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmlib/mms_util.c,v
retrieving revision 1.81
diff -r1.81 mms_util.c
27a28,30
> #ifdef SunOS
> #include <fcntl.h>
> #endif
819a823,826
> #ifdef SunOS
> flock_t lock;
> int flg=shouldblock ?F_SETLKW : F_SETLK;
> #else
820a828
> #endif
822a831,837
> #ifdef SunOS
> lock.l_whence = SEEK_SET;
> lock.l_start = 0;
> lock.l_len=0;
> lock.l_type = F_WRLCK;
> n=fcntl(fd, flg, &lock);
> #else
823a839
> #endif
Index: mmsbox/dlr.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmsbox/dlr.c,v
retrieving revision 1.4
diff -r1.4 dlr.c
24a25,28
> #ifdef SunOS
> #include <fcntl.h>
> #endif
>
Index: mmsbox/mmsbox.c
===================================================================
RCS file: /cvsroot/mbuni/mbuni/mmsbox/mmsbox.c,v
retrieving revision 1.58
diff -r1.58 mmsbox.c
21a22,25
> #ifdef SunOS
> #include <strings.h>
> #include <fcntl.h>
> #endif
_______________________________________________
Users mailing list
[email protected]
http://lists.mbuni.org/mailman/listinfo/users