1570af302Sopenharmony_ci#include "stdio_impl.h" 2570af302Sopenharmony_ci 3570af302Sopenharmony_ciint fgetpos(FILE *restrict f, fpos_t *restrict pos) 4570af302Sopenharmony_ci{ 5570af302Sopenharmony_ci off_t off = __ftello(f); 6570af302Sopenharmony_ci if (off < 0) return -1; 7570af302Sopenharmony_ci *(long long *)pos = off; 8570af302Sopenharmony_ci return 0; 9570af302Sopenharmony_ci} 10570af302Sopenharmony_ci 11570af302Sopenharmony_ciweak_alias(fgetpos, fgetpos64); 12