diff options
author | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:41:00 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2012-03-22 15:41:00 +0000 |
commit | 1118c95535ea51961437089fc3dece5ab4ea7e1b (patch) | |
tree | 1515bd2376a6d6c5123791662307ce2ed90cdf36 /include/platform.h | |
parent | 0d8b2c4a929ea9d3ac37499319fe0d8e7941a0c2 (diff) | |
parent | 066f39956641300c1e5c6bfe6c11a115cea3e2cf (diff) | |
download | busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.tar.gz busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.tar.bz2 busybox-w32-1118c95535ea51961437089fc3dece5ab4ea7e1b.zip |
Merge commit '066f39956641300c1e5c6bfe6c11a115cea3e2cf' into merge
Conflicts:
procps/ps.c
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 58 |
1 files changed, 51 insertions, 7 deletions
diff --git a/include/platform.h b/include/platform.h index 48e256aa0..319ef4a9e 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -349,8 +349,8 @@ typedef unsigned smalluint; | |||
349 | 349 | ||
350 | /* ---- Who misses what? ------------------------------------ */ | 350 | /* ---- Who misses what? ------------------------------------ */ |
351 | 351 | ||
352 | /* Assume all these functions exist by default. Platforms where it is not | 352 | /* Assume all these functions and header files exist by default. |
353 | * true will #undef them below. | 353 | * Platforms where it is not true will #undef them below. |
354 | */ | 354 | */ |
355 | #define HAVE_CLEARENV 1 | 355 | #define HAVE_CLEARENV 1 |
356 | #define HAVE_FDATASYNC 1 | 356 | #define HAVE_FDATASYNC 1 |
@@ -365,10 +365,24 @@ typedef unsigned smalluint; | |||
365 | #define HAVE_STRCHRNUL 1 | 365 | #define HAVE_STRCHRNUL 1 |
366 | #define HAVE_STRSEP 1 | 366 | #define HAVE_STRSEP 1 |
367 | #define HAVE_STRSIGNAL 1 | 367 | #define HAVE_STRSIGNAL 1 |
368 | #define HAVE_STRVERSCMP 1 | ||
368 | #define HAVE_VASPRINTF 1 | 369 | #define HAVE_VASPRINTF 1 |
370 | #define HAVE_UNLOCKED_STDIO 1 | ||
371 | #define HAVE_UNLOCKED_LINE_OPS 1 | ||
372 | #define HAVE_GETLINE 1 | ||
373 | #define HAVE_XTABS 1 | ||
369 | #define HAVE_MNTENT_H 1 | 374 | #define HAVE_MNTENT_H 1 |
375 | #define HAVE_NET_ETHERNET_H 1 | ||
370 | #define HAVE_SYS_STATFS_H 1 | 376 | #define HAVE_SYS_STATFS_H 1 |
371 | #define HAVE_XTABS 1 | 377 | |
378 | #if defined(__UCLIBC_MAJOR__) | ||
379 | # if __UCLIBC_MAJOR__ == 0 \ | ||
380 | && ( __UCLIBC_MINOR__ < 9 \ | ||
381 | || (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 31) \ | ||
382 | ) | ||
383 | # undef HAVE_STRVERSCMP | ||
384 | # endif | ||
385 | #endif | ||
372 | 386 | ||
373 | #if defined(__dietlibc__) | 387 | #if defined(__dietlibc__) |
374 | # undef HAVE_STRCHRNUL | 388 | # undef HAVE_STRCHRNUL |
@@ -383,13 +397,17 @@ typedef unsigned smalluint; | |||
383 | # undef HAVE_STRCASESTR | 397 | # undef HAVE_STRCASESTR |
384 | # undef HAVE_STRCHRNUL | 398 | # undef HAVE_STRCHRNUL |
385 | # undef HAVE_STRSIGNAL | 399 | # undef HAVE_STRSIGNAL |
400 | # undef HAVE_STRVERSCMP | ||
386 | # undef HAVE_VASPRINTF | 401 | # undef HAVE_VASPRINTF |
402 | # undef HAVE_UNLOCKED_STDIO | ||
403 | # undef HAVE_UNLOCKED_LINE_OPS | ||
387 | # undef HAVE_MNTENT_H | 404 | # undef HAVE_MNTENT_H |
388 | # undef HAVE_SYS_STATFS_H | 405 | # undef HAVE_SYS_STATFS_H |
389 | #endif | 406 | #endif |
390 | 407 | ||
391 | #if defined(__WATCOMC__) | 408 | #if defined(__WATCOMC__) |
392 | # undef HAVE_DPRINTF | 409 | # undef HAVE_DPRINTF |
410 | # undef HAVE_GETLINE | ||
393 | # undef HAVE_MEMRCHR | 411 | # undef HAVE_MEMRCHR |
394 | # undef HAVE_MKDTEMP | 412 | # undef HAVE_MKDTEMP |
395 | # undef HAVE_SETBIT | 413 | # undef HAVE_SETBIT |
@@ -398,30 +416,51 @@ typedef unsigned smalluint; | |||
398 | # undef HAVE_STRCHRNUL | 416 | # undef HAVE_STRCHRNUL |
399 | # undef HAVE_STRSEP | 417 | # undef HAVE_STRSEP |
400 | # undef HAVE_STRSIGNAL | 418 | # undef HAVE_STRSIGNAL |
419 | # undef HAVE_STRVERSCMP | ||
401 | # undef HAVE_VASPRINTF | 420 | # undef HAVE_VASPRINTF |
421 | # undef HAVE_UNLOCKED_STDIO | ||
422 | # undef HAVE_UNLOCKED_LINE_OPS | ||
423 | # undef HAVE_NET_ETHERNET_H | ||
402 | #endif | 424 | #endif |
403 | 425 | ||
404 | #if defined(__FreeBSD__) | 426 | /* These BSD-derived OSes share many similarities */ |
405 | # undef HAVE_STRCHRNUL | ||
406 | #endif | ||
407 | |||
408 | #if (defined __digital__ && defined __unix__) \ | 427 | #if (defined __digital__ && defined __unix__) \ |
409 | || defined __APPLE__ \ | 428 | || defined __APPLE__ \ |
410 | || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ | 429 | || defined __FreeBSD__ || defined __OpenBSD__ || defined __NetBSD__ |
411 | # undef HAVE_CLEARENV | 430 | # undef HAVE_CLEARENV |
412 | # undef HAVE_FDATASYNC | 431 | # undef HAVE_FDATASYNC |
432 | # undef HAVE_GETLINE | ||
413 | # undef HAVE_MNTENT_H | 433 | # undef HAVE_MNTENT_H |
414 | # undef HAVE_PTSNAME_R | 434 | # undef HAVE_PTSNAME_R |
415 | # undef HAVE_SYS_STATFS_H | 435 | # undef HAVE_SYS_STATFS_H |
416 | # undef HAVE_SIGHANDLER_T | 436 | # undef HAVE_SIGHANDLER_T |
437 | # undef HAVE_STRVERSCMP | ||
417 | # undef HAVE_XTABS | 438 | # undef HAVE_XTABS |
418 | # undef HAVE_DPRINTF | 439 | # undef HAVE_DPRINTF |
419 | #endif | 440 | #endif |
420 | 441 | ||
442 | #if defined(__FreeBSD__) | ||
443 | # undef HAVE_STRCHRNUL | ||
444 | #endif | ||
445 | |||
446 | #if defined(__NetBSD__) | ||
447 | # define HAVE_GETLINE 1 /* Recent NetBSD versions have getline() */ | ||
448 | #endif | ||
449 | |||
421 | #if defined(__digital__) && defined(__unix__) | 450 | #if defined(__digital__) && defined(__unix__) |
422 | # undef HAVE_STPCPY | 451 | # undef HAVE_STPCPY |
423 | #endif | 452 | #endif |
424 | 453 | ||
454 | #if defined(ANDROID) | ||
455 | # undef HAVE_DPRINTF | ||
456 | # undef HAVE_GETLINE | ||
457 | # undef HAVE_STPCPY | ||
458 | # undef HAVE_STRCHRNUL | ||
459 | # undef HAVE_STRVERSCMP | ||
460 | # undef HAVE_UNLOCKED_LINE_OPS | ||
461 | # undef HAVE_NET_ETHERNET_H | ||
462 | #endif | ||
463 | |||
425 | /* | 464 | /* |
426 | * Now, define prototypes for all the functions defined in platform.c | 465 | * Now, define prototypes for all the functions defined in platform.c |
427 | * These must come after all the HAVE_* macros are defined (or not) | 466 | * These must come after all the HAVE_* macros are defined (or not) |
@@ -475,4 +514,9 @@ extern char *strsep(char **stringp, const char *delim) FAST_FUNC; | |||
475 | extern int vasprintf(char **string_ptr, const char *format, va_list p) FAST_FUNC; | 514 | extern int vasprintf(char **string_ptr, const char *format, va_list p) FAST_FUNC; |
476 | #endif | 515 | #endif |
477 | 516 | ||
517 | #ifndef HAVE_GETLINE | ||
518 | #include <stdio.h> /* for FILE */ | ||
519 | extern ssize_t getline(char **lineptr, size_t *n, FILE *stream) FAST_FUNC; | ||
520 | #endif | ||
521 | |||
478 | #endif | 522 | #endif |