| OLD | NEW |
| 1 #include "stdio_impl.h" | 1 #include "stdio_impl.h" |
| 2 #include <fcntl.h> | 2 #include <fcntl.h> |
| 3 | 3 |
| 4 /* The basic idea of this implementation is to open a new FILE, | 4 /* The basic idea of this implementation is to open a new FILE, |
| 5 * hack the necessary parts of the new FILE into the old one, then | 5 * hack the necessary parts of the new FILE into the old one, then |
| 6 * close the new FILE. */ | 6 * close the new FILE. */ |
| 7 | 7 |
| 8 /* Locking IS necessary because another thread may provably hold the | 8 /* Locking IS necessary because another thread may provably hold the |
| 9 * lock, via flockfile or otherwise, when freopen is called, and in that | 9 * lock, via flockfile or otherwise, when freopen is called, and in that |
| 10 * case, freopen cannot act until the lock is released. */ | 10 * case, freopen cannot act until the lock is released. */ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 FUNLOCK(f); | 48 FUNLOCK(f); |
| 49 return f; | 49 return f; |
| 50 | 50 |
| 51 fail2: | 51 fail2: |
| 52 fclose(f2); | 52 fclose(f2); |
| 53 fail: | 53 fail: |
| 54 fclose(f); | 54 fclose(f); |
| 55 return NULL; | 55 return NULL; |
| 56 } | 56 } |
| 57 | |
| 58 LFS64(freopen); | |
| OLD | NEW |