HP3000-L Archives

April 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Steve Hoogheem <[log in to unmask]>
Reply To:
Steve Hoogheem <[log in to unmask]>
Date:
Fri, 14 Apr 2000 16:40:25 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (37 lines)
Kevin Newman wrote in message ...
>Anyone know what I need to do in order to use the fsync function that is
>available in the jazz posix wrappers?  I see that there are
>/POSIXC60/lib, /POSIXC60/include, and /POSIXC60/posix.1_notavail/fsync/
>directories, but I need to know what I need to do on the compile and
>link side of things to get this function.


For compiling, fsync() is defined in <unistd.h>, in the include directory,
so use "-I/POSIXC60/include" in your compile.  If you are writing C source
code, use "#include <unistd.h> at the top of your source where you include
header files.

For linking, fsync() is in libposix60.a in the lib directory; you can use it
as is right away! :-)  Libposix60.a does have a dependency of also including
the socket and svipc libraries - use
"-L/POSIXC60/lib -lposix60 -lsocket -lsvipc" in your link.

Finally, if you want all the details, directory posix.1_notavail/fsync
contains:
   - fsync.c - the C source of fsync()
   - fsynct.c - a test program which which calls fsync()
   - Makefile which compiles and links the programs
Entering "make clean" and then "make", you will see the commands executed,
showing all the options for compiling and linking I mentioned above.

2 test programs are built from the same test source.  The first, fsynct, is
linked without the Porting Wrappers to demonstrate the it does not run
because fsync() today is missing from MPE.  The second, fsynctw, is linked
with libposix60.a and executes as desired.  Our future plans call for adding
fsync() and all the other Porting Wrappers to MPE.

Enjoy,
Steve Hoogheem
HP e3000 R&D Lab
mailto:[log in to unmask]

ATOM RSS1 RSS2