Skip to content

Commit f7751e1

Browse files
committed
ifndef
1 parent bb135fb commit f7751e1

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

  • problems
    • find_single/dist/find_single
    • sort_single/dist/sort_single

problems/find_single/dist/find_single/find.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Searches for a needle in a haystack
2-
#define _XOPEN_SOURCE 500
2+
#ifndef _XOPEN_SOURCE
3+
#define _XOPEN_SOURCE 500
4+
#endif
5+
36
#include <cs50.h>
47
#include <stdio.h>
58
#include <stdlib.h>

problems/sort_single/dist/sort_single/sort.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Sorts n numbers and prints them out
2-
#define _XOPEN_SOURCE 500
2+
#ifndef _XOPEN_SOURCE
3+
#define _XOPEN_SOURCE 500
4+
#endif
5+
36
#include <cs50.h>
47
#include <stdio.h>
58
#include <stdlib.h>

0 commit comments

Comments
 (0)