Re: CVS: Compile problem on Solaris

2001-12-04 Thread Stephan Witt

Lars Gullik Bjønnes wrote:
 
 Kayvan A. Sylvan [EMAIL PROTECTED] writes:
 
 | On Tue, Dec 04, 2001 at 12:00:46AM +0100, Lars Gullik Bjønnes wrote:
  Ok, what is munmap's prototype on your box?
 
 | #ifdef  __STDC__
 | #if (_POSIX_C_SOURCE  2)
 | [...]
 | extern int munmap(void *, size_t);
 | [...]
 | #else
 | [...]
 | extern int munmap(caddr_t, size_t);
 
 and what is caddr_t? my guess is char*

Yes, it is.

/usr/include/sys/types.h:typedef char *caddr_t; /* ?core address type */

Stephan


[EMAIL PROTECTED] | beusen Solutions GmbH
fon: +49 30 549932-62| Landsberger Allee 366
fax: +49 30 549932-21| 12681 Berlin, Germany





Re: CVS: Compile problem on Solaris

2001-12-04 Thread Stephan Witt

Lars Gullik Bjønnes wrote:
> 
> "Kayvan A. Sylvan" <[EMAIL PROTECTED]> writes:
> 
> | On Tue, Dec 04, 2001 at 12:00:46AM +0100, Lars Gullik Bjønnes wrote:
> >> Ok, what is munmap's prototype on your box?
> >
> | #ifdef  __STDC__
> | #if (_POSIX_C_SOURCE > 2)
> | [...]
> | extern int munmap(void *, size_t);
> | [...]
> | #else
> | [...]
> | extern int munmap(caddr_t, size_t);
> 
> and what is caddr_t? my guess is char*

Yes, it is.

/usr/include/sys/types.h:typedef char *caddr_t; /* ? type */

Stephan


<[EMAIL PROTECTED]> | beusen Solutions GmbH
fon: +49 30 549932-62| Landsberger Allee 366
fax: +49 30 549932-21| 12681 Berlin, Germany





CVS: Compile problem on Solaris

2001-12-03 Thread Kayvan A. Sylvan

Hi folks,

Here is the Solaris compile problem:

g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost 
-I/remote/tools/ksylvan/include -isystem /usr/openwin/include -O2 -isystem 
/depot/X11/include -W -Wall -Wp,-MD,.deps/lyxsum.pp -c lyxsum.C
lyxsum.C:23: warning: #warning lyx::sum() using mmap (lightning fast)
lyxsum.C: In function `long unsigned int lyx::sum(const string )':
lyxsum.C:55: ANSI C++ forbids implicit conversion from `void *' in argument passing
make[2]: *** [lyxsum.lo] Error 1

-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | crown of her husband | Robin Gregory (2/28/92)



Re: CVS: Compile problem on Solaris

2001-12-03 Thread Kayvan A. Sylvan

On Tue, Dec 04, 2001 at 12:00:46AM +0100, Lars Gullik Bjønnes wrote:
 Ok, what is munmap's prototype on your box?

#ifdef  __STDC__
#if (_POSIX_C_SOURCE  2)
[...]
extern int munmap(void *, size_t);
[...]
#else
[...]
extern int munmap(caddr_t, size_t);
[...]
#endif  /* (_POSIX_C_SOURCE  2) */
[...]
#else   /* __STDC__ */
[...]
extern int munmap();
[...]
#endif /* __STDC__ */

-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | crown of her husband | Robin Gregory (2/28/92)



Re: CVS: Compile problem on Solaris

2001-12-03 Thread Ben Stanley

So does that mean that we should
#define _POSIX_C_SOURCE 3
or something like that before
#include sys/mman.h

I don't have experience with Solaris on this level...

Kayvan A. Sylvan wrote:

On Tue, Dec 04, 2001 at 12:00:46AM +0100, Lars Gullik Bjønnes wrote:

Ok, what is munmap's prototype on your box?


#ifdef  __STDC__
#if (_POSIX_C_SOURCE  2)
[...]
extern int munmap(void *, size_t);
[...]
#else
[...]
extern int munmap(caddr_t, size_t);
[...]
#endif  /* (_POSIX_C_SOURCE  2) */
[...]
#else   /* __STDC__ */
[...]
extern int munmap();
[...]
#endif /* __STDC__ */







CVS: Compile problem on Solaris

2001-12-03 Thread Kayvan A. Sylvan

Hi folks,

Here is the Solaris compile problem:

g++ -DHAVE_CONFIG_H -I. -I. -I../../src -I./../ -I../../boost 
-I/remote/tools/ksylvan/include -isystem /usr/openwin/include -O2 -isystem 
/depot/X11/include -W -Wall -Wp,-MD,.deps/lyxsum.pp -c lyxsum.C
lyxsum.C:23: warning: #warning lyx::sum() using mmap (lightning fast)
lyxsum.C: In function `long unsigned int lyx::sum(const string &)':
lyxsum.C:55: ANSI C++ forbids implicit conversion from `void *' in argument passing
make[2]: *** [lyxsum.lo] Error 1

-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)



Re: CVS: Compile problem on Solaris

2001-12-03 Thread Kayvan A. Sylvan

On Tue, Dec 04, 2001 at 12:00:46AM +0100, Lars Gullik Bjønnes wrote:
> Ok, what is munmap's prototype on your box?

#ifdef  __STDC__
#if (_POSIX_C_SOURCE > 2)
[...]
extern int munmap(void *, size_t);
[...]
#else
[...]
extern int munmap(caddr_t, size_t);
[...]
#endif  /* (_POSIX_C_SOURCE > 2) */
[...]
#else   /* __STDC__ */
[...]
extern int munmap();
[...]
#endif /* __STDC__ */

-- 
Kayvan A. Sylvan  | Proud husband of   | Father to my kids:
Sylvan Associates, Inc.   | Laura Isabella Sylvan  | Katherine Yelena (8/8/89)
http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)



Re: CVS: Compile problem on Solaris

2001-12-03 Thread Ben Stanley

So does that mean that we should
#define _POSIX_C_SOURCE 3
or something like that before
#include 

I don't have experience with Solaris on this level...

Kayvan A. Sylvan wrote:

>On Tue, Dec 04, 2001 at 12:00:46AM +0100, Lars Gullik Bjønnes wrote:
>
>>Ok, what is munmap's prototype on your box?
>>
>
>#ifdef  __STDC__
>#if (_POSIX_C_SOURCE > 2)
>[...]
>extern int munmap(void *, size_t);
>[...]
>#else
>[...]
>extern int munmap(caddr_t, size_t);
>[...]
>#endif  /* (_POSIX_C_SOURCE > 2) */
>[...]
>#else   /* __STDC__ */
>[...]
>extern int munmap();
>[...]
>#endif /* __STDC__ */
>