Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.53 KB | None | 0 0
  1. === modified file 'kernel/generic/include/typedefs.h'
  2. --- kernel/generic/include/typedefs.h   2015-06-01 00:04:05 +0000
  3. +++ kernel/generic/include/typedefs.h   2017-03-28 14:36:23 +0000
  4. @@ -58,7 +58,9 @@
  5.  
  6.  typedef volatile uint8_t ioport8_t;
  7.  typedef volatile uint16_t ioport16_t;
  8. -typedef volatile uint32_t ioport32_t;
  9. +typedef volatile uint32_t ioport32_t;  
  10. +
  11. +typedef native_t ptrdiff_t;
  12.  
  13.  #ifdef __32_BITS__
  14.  
  15.  
  16. === modified file 'kernel/test/print/print2.c'
  17. --- kernel/test/print/print2.c  2012-04-02 15:52:07 +0000
  18. +++ kernel/test/print/print2.c  2017-03-28 14:42:44 +0000
  19. @@ -51,6 +51,15 @@
  20.         TPRINTF("Expected output: [0x11] [0x012] [0x013] [0x00014] [0x00015]\n");
  21.         TPRINTF("Real output:     [%#x] [%#5.3x] [%#-5.3x] [%#3.5x] [%#-3.5x]\n\n", 17, 18, 19, 20, 21);
  22.  
  23. +  char ch[12];
  24. +       ptrdiff_t d, neg_d;
  25. +      
  26. +       d = &ch[0] - &ch[12];
  27. +       neg_d = (unsigned)(-d);
  28. +       TPRINTF("Testing printf(\"%%td %%tu %%tx %%ti %%to\", d, neg_d, neg_d, d, neg_d):\n");
  29. +       TPRINTF("Expected output: [-12] [12] [c] [-12] [14]\n");
  30. +       TPRINTF("Real output:     [%td] [%tu] [%tx] [%ti] [%to]\n\n", d, neg_d, neg_d, d, neg_d);
  31. +      
  32.         sysarg_t nat = UINTN_C(0x12345678);
  33.  
  34.         TPRINTF("Testing printf(\"%%#" PRIx64 " %%#" PRIx32 " %%#" PRIx16 " %%#" PRIx8 " %%#" PRIxn " %%#" PRIx64 " %%s\", (uint64_t) UINT64_C(0x1234567887654321), (uint32_t) UINT32_C(0x12345678), (uint16_t) UINT16_C(0x1234), (uint8_t) UINT8_C(0x12), nat, (uint64_t) UINT64_C(0x1234567887654321), \"Lovely string\"):\n");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement