Operating System - HP-UX
1819721 Members
3186 Online
109606 Solutions
New Discussion

Bacula: try to compile on hpux11-31

 
SOLVED
Go to solution
uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31

Ok thanks

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31

I have removed reference to system call in /usr/include/sys/fcntl.h

But bacula don't compile give errors.

 

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

>I have removed reference to system call in /usr/include/sys/fcntl.h

 

You don't remove it, you move it down to the right place, so it's in the extern "C" block.

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31

I cannot found the "external C block" on fnctl.h,can you post an example please?

Thanks

Dennis Handly
Acclaimed Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

>I cannot find the "external C block" on fnctl.h

 

If you use C++, you should know what an extern "C" block is.

This block doesn't belong here (or the prototype doesn't):

#if (defined(_INCLUDE_XOPEN_SOURCE_600) || defined(_INCLUDE_HPUX_SOURCE))

extern int posix_fadvise __((int, off_t, off_t, int));

#if (defined(_INCLUDE_HPUX_SOURCE))
extern int posix_fadvise64 __((int, off_t, off_t, int));
#endif

/*
* posix_fadvise() hints for POSIX IEEE Std 1003.1
*/

#define POSIX_FADV_NORMAL 1 /* Application has no advice */
#define POSIX_FADV_SEQUENTIAL 2 /* Sequentially accessed data */
#define POSIX_FADV_RANDOM 3 /* Data accessed is randomly */
#define POSIX_FADV_WILLNEED 4 /* Data will be accessed in future */
#define POSIX_FADV_DONTNEED 5 /* Data will not be accessed again */
#define POSIX_FADV_NOREUSE 6 /* Data will be accessed once only */

#endif /* defined(_INCLUDE_XOPEN_SOURCE_600) || defined(_INCLUDE_HPUX_SOURCE) */

 

It belongs where the comment says:

/* Function prototypes */

# ifndef _KERNEL
# ifdef __cplusplus
extern "C" {                         <<<< extern "C" block start
# endif /* __cplusplus */

<< move to here

 

There is another thing wrong but that's shouldn't be important.

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

Thanks never used c o c++

I'm a junior sysadm,know some bash,many things of linux,hpux,aix,etc..

even  systemV,but lines of C++ or C get me in panic,

 

uxbeginner22
Trusted Contributor

Re: Bacula: try to compile on HP-UX 11-31 <fcntl.h> not C++ified

Works fine with new fcntl.h

Thanks