patch-list_utils_c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. $OpenBSD: patch-list_utils_c,v 1.2 2005/06/21 18:48:23 naddy Exp $
  2. --- list_utils.c.orig Thu Dec 24 06:00:44 1998
  3. +++ list_utils.c Tue Jun 21 20:41:05 2005
  4. @@ -143,7 +143,12 @@ printnode(struct listStruct *list, int a
  5. getfilemodes(&list->statbuf, filemodes);
  6. - sprintf(outputStr,"%.2s %-11.20s %-2d %-8.20s %-8.20s %-6ld %-10.20s "
  7. +#ifdef SOLARIS25
  8. + sprintf(outputStr,
  9. +#else
  10. + snprintf(outputStr, sizeof(outputStr),
  11. +#endif
  12. + "%.2s %-11.20s %-2d %-8.20s %-8.20s %-6ld %-10.20s "
  13. "%.20s",
  14. (action == ADDITION) ? "+ " : "- ", filemodes,
  15. (int)list->statbuf.st_nlink, username, groupname,
  16. @@ -168,7 +173,7 @@ printnode(struct listStruct *list, int a
  17. -#ifdef 0
  18. +#if 0
  19. printf("%-11s %-2d %-8s %-8s %-6ld %-10s %-10s\n", filemodes,
  20. (int)list->statbuf.st_nlink, username, groupname,
  21. list->statbuf.st_size, timehold, list->filename);
  22. @@ -299,7 +304,7 @@ void getfilemodes(struct stat *statbuf,
  23. else if (S_ISDOOR(mode))
  24. holder[0] = 'p';
  25. #else
  26. -#if defined (BSD)
  27. +#if defined (BSD) && !defined(__OpenBSD__)
  28. else if (S_ISWHT(mode))
  29. holder[0] = '%';
  30. #endif