| 190 | |
| 191 | |
| 192 | static unsigned int binIn(void* data, int len) |
| 193 | { |
| 194 | #ifdef WIN_NT |
| 195 | static int bin = -1; |
| 196 | if (bin == -1) |
| 197 | { |
| 198 | bin = fileno(stdin); |
| 199 | _setmode(bin, _O_BINARY); |
| 200 | } |
| 201 | #else |
| 202 | const int bin = 0; |
| 203 | #endif |
| 204 | |
| 205 | int n = read(bin, data, len); |
| 206 | if (n < 0) |
| 207 | Firebird::system_call_failed::raise("read(stdin)"); |
| 208 | |
| 209 | return n; |
| 210 | } |
| 211 | |
| 212 | |
| 213 | static int svc_api_gbak(Firebird::UtilSvc* uSvc, const Switches& switches) |
no test coverage detected