File: test_wzd_structs.c

package info (click to toggle)
wzdftpd 0.8.1-2etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 5,440 kB
  • ctags: 3,559
  • sloc: ansic: 40,580; sh: 9,306; lex: 2,082; makefile: 528; sql: 206; perl: 18
file content (34 lines) | stat: -rw-r--r-- 785 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include <stdlib.h>
#include <string.h>

#include <libwzd-core/wzd_structs.h>
#include <libwzd-core/wzd_user.h>
#include <libwzd-core/wzd_group.h>

#define C1 0x12345678
#define C2 0x9abcdef0

int main(int argc, char *argv[])
{
  unsigned long c1 = C1;
  unsigned long c2 = C2;

  printf("Size of structs:\n");
  printf("  wzd_config_t:       %d\n", sizeof(wzd_config_t));
  printf("  wzd_context_t:      %d\n", sizeof(wzd_context_t));
  printf("  wzd_backend_t:      %d\n", sizeof(wzd_backend_t));
  printf("  wzd_user_t:         %d\n", sizeof(wzd_user_t));
  printf("  wzd_group_t:        %d\n", sizeof(wzd_group_t));


  if (c1 != C1) {
    fprintf(stderr, "c1 nuked !\n");
    return -1;
  }
  if (c2 != C2) {
    fprintf(stderr, "c2 nuked !\n");
    return -1;
  }

  return 0;
}