-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.h
More file actions
executable file
·43 lines (38 loc) · 941 Bytes
/
utils.h
File metadata and controls
executable file
·43 lines (38 loc) · 941 Bytes
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
35
36
37
38
39
40
41
42
43
#ifndef _UTILS_H
#define _UTILS_H
// Std
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
// Time
#include <time.h>
#include <sys/time.h>
// Math
#include <math.h>
// General Sys
#include <errno.h>
#include <ctype.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
#include <sys/stat.h>
// INET/INET6
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/wait.h>
#include <sys/poll.h>
#include <signal.h>
// Threads
#include <pthread.h>
#include <assert.h>
// Para usar: ERROR("Malloc"); ira fazer um fprintf da linha e func que chamaram, com a string "Malloc"
// Trocar comentarios para entregar o projecto sem que as nossas mensagens de erro para debug sejam impressas.
#define ERROR(a) fprintf( stderr, "%s : %d : "#a"\n", __FUNCTION__, __LINE__)
//#define ERROR(a)
#define PRINT_LATENCIES 0
#define ZERO "MA=="
#endif