HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: flock
Operating System - HP-UX
1825693
Members
3265
Online
109686
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2008 06:47 AM
11-17-2008 06:47 AM
flock
I am using the Migration Environment v1.4 and to port software from Tru64 to HP-UX 11i v3 (11.31).
The software is written in C++ and I am having problems with whith the type flock (not the function) because the compiler dosen't recognize it. I have read that I need the library libtru64.so and that it is present in the Migration Environment v1.4 and that it's a link to:
/usr/lib/hpux64/libcext.so.
First I don't have libtru64.so in the Migration
Environment.
Second I have added:
/usr/lib/hpux32/libcext.so
in the Makefile but it didn't change nothing.
Thanks in advance.
The software is written in C++ and I am having problems with whith the type flock (not the function) because the compiler dosen't recognize it. I have read that I need the library libtru64.so and that it is present in the Migration Environment v1.4 and that it's a link to:
/usr/lib/hpux64/libcext.so.
First I don't have libtru64.so in the Migration
Environment.
Second I have added:
/usr/lib/hpux32/libcext.so
in the Makefile but it didn't change nothing.
Thanks in advance.
- Tags:
- Tru64
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2008 07:09 AM
11-17-2008 07:09 AM
Re: flock
>type flock (not the function)
HP-UX doesn't have flock as either. There is a lockf(2).
You need a header to define flock and whatever functions that need it.
Have you looked at:
http://docs.hp.com/en/B3921-60631/flock.2.html
HP-UX doesn't have flock as either. There is a lockf(2).
You need a header to define flock and whatever functions that need it.
Have you looked at:
http://docs.hp.com/en/B3921-60631/flock.2.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2008 08:35 AM
11-17-2008 08:35 AM
Re: flock
I am using the flock stucture in this piece of code.
void File::lock(bool bExclusive) throw (ios_base::failure)
{
flock tLockInfo;
int iCmd;
memset(&tLockInfo, 0, sizeof(tLockInfo));^M
if (bExclusive)
tLockInfo.l_type = F_WRLCK;
else
tLockInfo.l_type = F_RDLCK;
iCmd = F_SETLKW; // Blocking lock, wait the success of fuinction
if (::fcntl(m_hFile, iCmd, &tLockInfo) == -1)
throwIOSysException("lock-fcntl");
}
and I have included:
#include
#include
#include
#include
#include
#include
#include
and the compiler dosen't recognize the flock structure.
Thank you
void File::lock(bool bExclusive) throw (ios_base::failure)
{
flock tLockInfo;
int iCmd;
memset(&tLockInfo, 0, sizeof(tLockInfo));^M
if (bExclusive)
tLockInfo.l_type = F_WRLCK;
else
tLockInfo.l_type = F_RDLCK;
iCmd = F_SETLKW; // Blocking lock, wait the success of fuinction
if (::fcntl(m_hFile, iCmd, &tLockInfo) == -1)
throwIOSysException("lock-fcntl");
}
and I have included:
#include
#include
#include
#include
#include
#include
#include
and the compiler dosen't recognize the flock structure.
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2008 09:04 AM
11-17-2008 09:04 AM
Re: flock
I have found the solution. I have to define:
struct flock tLockInfo;
Thank you.
struct flock tLockInfo;
Thank you.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP