mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:23:06 +00:00
[UCRT] Import Microsoft.Windows.SDK.CRTSource version 10.0.22621.3
Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3 License: MIT
This commit is contained in:
parent
f1b60c66f0
commit
04e0dc4a7a
568 changed files with 115483 additions and 0 deletions
26
sdk/lib/ucrt/stdio/fgetpos.cpp
Normal file
26
sdk/lib/ucrt/stdio/fgetpos.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// fgetpos.cpp
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
// Defines fgetpos(), which gets the file position in an opaque internal format.
|
||||
//
|
||||
#include <corecrt_internal_stdio.h>
|
||||
|
||||
|
||||
|
||||
// Gets the file position in the internal fpos_t format. The returned value
|
||||
// should only be used in a call to fsetpos(). Our implementation happens to
|
||||
// just wrap _ftelli64() and _fseeki64(). Return zero on success; returns -1
|
||||
// and sets errno on failure.
|
||||
extern "C" int __cdecl fgetpos(FILE* const stream, fpos_t* const position)
|
||||
{
|
||||
_VALIDATE_RETURN(stream != nullptr, EINVAL, -1);
|
||||
_VALIDATE_RETURN(position != nullptr, EINVAL, -1);
|
||||
|
||||
*position = _ftelli64(stream);
|
||||
if (*position == -1)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue