Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Add feature flags and missing #includes. #64

Merged
merged 1 commit into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/audio_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <stdbool.h>
#include <curses.h>
#include <string.h>
#include <strings.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
Expand Down
3 changes: 3 additions & 0 deletions src/audio_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
*
*/

/* TODO(iphydf): use nanosleep instead of usleep */
#define _XOPEN_SOURCE 500

#include "audio_device.h"

#ifdef AUDIO
Expand Down
2 changes: 2 additions & 0 deletions src/autocomplete.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@

#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <limits.h>
#include <sys/param.h>

#ifdef __APPLE__
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions src/chat_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <stdlib.h>
#include <string.h>
#include <strings.h>

#include "toxic.h"
#include "windows.h"
Expand Down
1 change: 1 addition & 0 deletions src/configdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
Expand Down
1 change: 1 addition & 0 deletions src/execute.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <string.h>
#include <assert.h>
Expand Down
1 change: 1 addition & 0 deletions src/file_transfers.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define FILE_TRANSFERS_H

#include <limits.h>
#include <sys/param.h>

#include "toxic.h"
#include "windows.h"
Expand Down
1 change: 1 addition & 0 deletions src/global_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <stdlib.h>
#include <string.h>
#include <strings.h>

#include "toxic.h"
#include "windows.h"
Expand Down
1 change: 1 addition & 0 deletions src/line_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _DEFAULT_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
Expand Down
3 changes: 3 additions & 0 deletions src/misc_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@
*
*/

#define _POSIX_C_SOURCE 200809L
#define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <limits.h>
#include <dirent.h>
Expand Down
1 change: 1 addition & 0 deletions src/misc_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#define MISC_TOOLS_H

#include <sys/stat.h>
#include <sys/types.h>

#include "windows.h"
#include "toxic.h"
Expand Down
1 change: 1 addition & 0 deletions src/name_lookup.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <strings.h>
#include <curl/curl.h>

#include "toxic.h"
Expand Down
1 change: 1 addition & 0 deletions src/settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <libconfig.h>
#include <ctype.h>

Expand Down
1 change: 1 addition & 0 deletions src/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#define SETTINGS_H

#include <limits.h>
#include <sys/param.h>

#include <tox/tox.h>

Expand Down
1 change: 1 addition & 0 deletions src/term_mplex.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _POSIX_C_SOURCE 2
#include <limits.h> /* PATH_MAX */
#include <stdio.h> /* fgets, popen, pclose */
#include <stdlib.h> /* malloc, realloc, free, getenv */
Expand Down
2 changes: 2 additions & 0 deletions src/toxic.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _XOPEN_SOURCE 500
#include <curses.h>
#include <errno.h>
#include <stdio.h>
Expand All @@ -30,6 +31,7 @@
#include <signal.h>
#include <locale.h>
#include <string.h>
#include <strings.h>
#include <time.h>
#include <pthread.h>
#include <getopt.h>
Expand Down
1 change: 1 addition & 0 deletions src/video_call.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include <stdbool.h>
#include <curses.h>
#include <string.h>
#include <strings.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
Expand Down
1 change: 1 addition & 0 deletions src/video_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _XOPEN_SOURCE 500
#include "video_device.h"
#include "video_call.h"

Expand Down
1 change: 1 addition & 0 deletions src/xtra.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
*
*/

#define _XOPEN_SOURCE 500
#include "xtra.h"
#include "misc_tools.h"

Expand Down