#endif
#include <errno.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char *p;
for (i=0; i < 0x100; i++)
{
- p = (char *) ((unsigned long int)(buf + 0xff) & ~0xff) + i;
+ p = (char *) ((uintptr_t)(buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p+3, "BAD/WRONG");
check (strlen (p) == 2, 4+i);
char buf[4096];
for (int i = 0; i < 0x100; ++i)
{
- char *p = (char *) ((unsigned long int)(buf + 0xff) & ~0xff) + i;
+ char *p = (char *) ((uintptr_t)(buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p + 3, "BAD/WRONG");
check (strnlen (p, 100) == 2, 10 + i);
char *p;
for (i=0; i < 0x100; i++)
{
- p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i;
+ p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p+3, "BAD/WRONG");
check (strchr (p, '/') == NULL, 9+i);
char *p;
for (i=0; i < 0x100; i++)
{
- p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i;
+ p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p+3, "BAD/WRONG");
cp = strchrnul (p, '/');
char *p;
for (i=0; i < 0x100; i++)
{
- p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i;
+ p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p+3, "BAD/WRONG");
check (rawmemchr (p, 'R') == p+8, 6+i);
char *p;
for (i=0; i < 0x100; i++)
{
- p = (char *) ((unsigned long int) (buf + 0xff) & ~0xff) + i;
+ p = (char *) ((uintptr_t) (buf + 0xff) & ~0xff) + i;
strcpy (p, "OK");
strcpy (p+3, "BAD/WRONG");
check (strrchr (p, '/') == NULL, 9+i);