Skip to content

Commit

Permalink
WIP: define a std-lib-compat-util.h and int-types.util.h
Browse files Browse the repository at this point in the history
  • Loading branch information
steadmon committed Jun 11, 2024
1 parent 0ebed32 commit 0617fb3
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
6 changes: 1 addition & 5 deletions git-compat-util.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,7 @@ static inline int is_xplatform_dir_sep(int c)
#include <netdb.h>
#include <pwd.h>
#include <sys/un.h>
#ifndef NO_INTTYPES_H
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#include "int-types-util.h"
#ifdef HAVE_ARC4RANDOM_LIBBSD
#include <bsd/stdlib.h>
#endif
Expand Down
10 changes: 10 additions & 0 deletions int-types-util.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef INT_TYPES_UTIL_H
#define INT_TYPES_UTIL_H

#ifndef NO_INTTYPES_H
#include <inttypes.h>
#else
#include <stdint.h>
#endif

#endif
2 changes: 0 additions & 2 deletions pager.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef PAGER_H
#define PAGER_H

#include <stdint.h>

struct child_process;

const char *git_pager(int stdout_is_tty);
Expand Down
6 changes: 6 additions & 0 deletions std-lib-compat-util.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef STD_LIB_COMPAT_UTIL_H
#define STD_LIB_COMPAT_UTIL_H

#include "int-types-util.h"

#endif
1 change: 1 addition & 0 deletions stubs/pager.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include "std-lib-compat-util.h"
#include "pager.h"

int pager_in_use(void)
Expand Down

0 comments on commit 0617fb3

Please sign in to comment.