@@ -250,64 +250,72 @@ else version (Solaris)
250
250
/*
251
251
L_ctermid
252
252
253
- char* ctermid(char*);
254
- FILE* fdopen(int, const scope char*);
255
- int fileno(FILE*);
256
- int fseeko(FILE*, off_t, int);
257
- off_t ftello(FILE*);
258
- char* gets(char*);
259
- int pclose(FILE*);
260
- FILE* popen(const scope char*, const scope char*);
253
+ char* ctermid(char*);
254
+ FILE* fdopen(int, const scope char*);
255
+ int fileno(FILE*);
256
+ int fseeko(FILE*, off_t, int);
257
+ off_t ftello(FILE*);
258
+ ssize_t getdelim(char**, size_t*, int, FILE*);
259
+ ssize_t getline(char**, size_t*, FILE*);
260
+ char* gets(char*);
261
+ int pclose(FILE*);
262
+ FILE* popen(const scope char*, const scope char*);
261
263
*/
262
264
263
265
version (CRuntime_Glibc )
264
266
{
265
267
enum L_ctermid = 9 ;
266
268
267
- static if ( __USE_FILE_OFFSET64 )
268
- {
269
- int fseeko64 (FILE * , off_t , int );
270
- alias fseeko64 fseeko;
271
- }
272
- else
273
- {
274
- int fseeko (FILE * , off_t , int );
275
- }
276
-
277
- static if ( __USE_FILE_OFFSET64 )
278
- {
279
- off_t ftello64 (FILE * );
280
- alias ftello64 ftello;
281
- }
282
- else
283
- {
284
- off_t ftello (FILE * );
285
- }
269
+ static if ( __USE_FILE_OFFSET64 )
270
+ {
271
+ int fseeko64 (FILE * , off_t , int );
272
+ alias fseeko64 fseeko;
273
+ }
274
+ else
275
+ {
276
+ int fseeko (FILE * , off_t , int );
277
+ }
278
+
279
+ static if ( __USE_FILE_OFFSET64 )
280
+ {
281
+ off_t ftello64 (FILE * );
282
+ alias ftello64 ftello;
283
+ }
284
+ else
285
+ {
286
+ off_t ftello (FILE * );
287
+ }
288
+
289
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
290
+ ssize_t getline (char ** , size_t * , FILE * );
286
291
}
287
292
else version (CRuntime_UClibc )
288
293
{
289
294
enum L_ctermid = 9 ;
290
295
enum L_cuserid = 9 ;
291
296
292
- static if ( __USE_FILE_OFFSET64 )
293
- {
294
- int fseeko64 (FILE * , off_t , int );
295
- alias fseeko64 fseeko;
296
- }
297
- else
298
- {
299
- int fseeko (FILE * , off_t , int );
300
- }
301
-
302
- static if ( __USE_FILE_OFFSET64 )
303
- {
304
- off_t ftello64 (FILE * );
305
- alias ftello64 ftello;
306
- }
307
- else
308
- {
309
- off_t ftello (FILE * );
310
- }
297
+ static if ( __USE_FILE_OFFSET64 )
298
+ {
299
+ int fseeko64 (FILE * , off_t , int );
300
+ alias fseeko64 fseeko;
301
+ }
302
+ else
303
+ {
304
+ int fseeko (FILE * , off_t , int );
305
+ }
306
+
307
+ static if ( __USE_FILE_OFFSET64 )
308
+ {
309
+ off_t ftello64 (FILE * );
310
+ alias ftello64 ftello;
311
+ }
312
+ else
313
+ {
314
+ off_t ftello (FILE * );
315
+ }
316
+
317
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
318
+ ssize_t getline (char ** , size_t * , FILE * );
311
319
}
312
320
else version (CRuntime_Musl )
313
321
{
@@ -332,6 +340,91 @@ else version (CRuntime_Musl)
332
340
{
333
341
off_t ftello (FILE * );
334
342
}
343
+
344
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
345
+ ssize_t getline (char ** , size_t * , FILE * );
346
+ }
347
+ else version (CRuntime_Bionic )
348
+ {
349
+ enum L_ctermid = 1024 ;
350
+
351
+ static if ( __USE_FILE_OFFSET64 )
352
+ {
353
+ int fseeko64 (FILE * , off_t , int );
354
+ alias fseeko64 fseeko;
355
+ }
356
+ else
357
+ {
358
+ int fseeko (FILE * , off_t , int );
359
+ }
360
+
361
+ static if ( __USE_FILE_OFFSET64 )
362
+ {
363
+ off_t ftello64 (FILE * );
364
+ alias ftello64 ftello;
365
+ }
366
+ else
367
+ {
368
+ off_t ftello (FILE * );
369
+ }
370
+
371
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
372
+ ssize_t getline (char ** , size_t * , FILE * );
373
+ }
374
+ else version (Darwin)
375
+ {
376
+ enum L_ctermid = 1024 ;
377
+
378
+ int fseeko (FILE * , off_t , int );
379
+ off_t ftello (FILE * );
380
+
381
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
382
+ ssize_t getline (char ** , size_t * , FILE * );
383
+ }
384
+ else version (FreeBSD )
385
+ {
386
+ import core.sys.freebsd.config ;
387
+
388
+ enum L_ctermid = 1024 ;
389
+
390
+ int fseeko (FILE * , off_t , int );
391
+ off_t ftello (FILE * );
392
+
393
+ static if (__FreeBSD_version >= 800000 )
394
+ {
395
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
396
+ ssize_t getline (char ** , size_t * , FILE * );
397
+ }
398
+ }
399
+ else version (NetBSD )
400
+ {
401
+ enum L_ctermid = 1024 ;
402
+
403
+ int fseeko (FILE * , off_t , int );
404
+ off_t ftello (FILE * );
405
+
406
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
407
+ ssize_t getline (char ** , size_t * , FILE * );
408
+ }
409
+ else version (OpenBSD )
410
+ {
411
+ enum L_ctermid = 1024 ;
412
+
413
+ int fseeko (FILE * , off_t , int );
414
+ off_t ftello (FILE * );
415
+
416
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
417
+ ssize_t getline (char ** , size_t * , FILE * );
418
+ }
419
+ else version (DragonFlyBSD )
420
+ {
421
+ enum L_ctermid = 1024 ;
422
+
423
+ int fseeko (FILE * , off_t , int );
424
+ off_t ftello (FILE * );
425
+
426
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
427
+ ssize_t getline (char ** , size_t * , FILE * );
335
428
}
336
429
else version (Solaris )
337
430
{
@@ -357,6 +450,9 @@ else version (Solaris)
357
450
{
358
451
off_t ftello (FILE * );
359
452
}
453
+
454
+ ssize_t getdelim (char ** , size_t * , int , FILE * );
455
+ ssize_t getline (char ** , size_t * , FILE * );
360
456
}
361
457
else version (Posix )
362
458
{
@@ -367,8 +463,6 @@ else version (Posix)
367
463
char * ctermid (char * );
368
464
FILE * fdopen (int , const scope char * );
369
465
int fileno (FILE * );
370
- // int fseeko(FILE*, off_t, int);
371
- // off_t ftello(FILE*);
372
466
char * gets (char * );
373
467
int pclose (FILE * );
374
468
FILE * popen (const scope char * , const scope char * );
@@ -547,7 +641,3 @@ unittest
547
641
assert (memcmp(ptr, testdata.ptr, testdata.length* wchar_t.sizeof) == 0 );
548
642
assert (fclose(f) == 0 );
549
643
}
550
-
551
-
552
- ssize_t getdelim (char ** lineptr, size_t * n, int delimiter, FILE * stream);
553
- ssize_t getline (char ** lineptr, size_t * n, FILE * stream);
0 commit comments