Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // Name : fdatasync.cpp
16 // Contains the source for fchdir
25 The fdatasync() function shall force all currently queued I/O operations associated
26 with the file indicated by file descriptor fildes to the synchronized I/O completion
27 state.The functionality shall be equivalent to fsync() with the symbol ->
28 _POSIX_SYNCHRONIZED_IO defined, with the exception that all I/O operations shall be
29 completed as defined for synchronized I/O data integrity completion.If successful,
30 the fdatasync() function shall return the value 0; otherwise, the function shall
31 return the value -1 and set errno to indicate the error.
36 EXPORT_C int fdatasync(int filedesc)
39 #ifndef _POSIX_SYNCHRONIZED_IO
40 #define _POSIX_SYNCHRONIZED_IO
41 #define FLAG_FOR_FSYNC 1
43 //Calls fsync that provides equivalent functionality.
44 retVal = fsync(filedesc);
47 #undef _POSIX_SYNCHRONIZED_IO;