From 695953440565103964e816e7326c66f3d171c3e0 Mon Sep 17 00:00:00 2001 From: jimi-wzq <wangzhengquan85@gmail.com> Date: 星期六, 01 八月 2020 10:48:18 +0800 Subject: [PATCH] fix conflict --- test/test.c | 36 +++--------------------------------- 1 files changed, 3 insertions(+), 33 deletions(-) diff --git a/test/test.c b/test/test.c index 99e3289..b978ef2 100644 --- a/test/test.c +++ b/test/test.c @@ -1,35 +1,5 @@ -#include "test.h" -#define MKEY 0x2222 -int testmatshm() { - - int shmid = -1; - void *shmp; - shmid = shmget(MKEY, 1024, IPC_CREAT | IPC_EXCL | OBJ_PERMS); - if (shmid == -1 && errno == EEXIST) { - printf("first create\n"); - shmid = shmget(MKEY, 0, 0); - } - - if (shmid == -1) - err_exit(errno, "testmatshm shmget"); - - shmp = shmat(shmid, NULL, 0); -} - -typedef struct buf_t { char buf[7]; } buf_t; - -void test(int size) { - char buf[size]; - printf("size = %d\n", sizeof(buf)); -} - -char msg[10]; +#include "usg_common.h" +#include "usg_typedef.h" + int main() { - // testmatshm(); - // testmatshm(); - - // sleep(60); - - // printf("size = %d, msg = %d\n", sizeof(buf_t), sizeof(msg)); - test(12); } \ No newline at end of file -- Gitblit v1.8.0