##// END OF EJS Templates
chg: add fchdirx as a utility function...
Jun Wu -
r28854:ddef1446 default
parent child Browse files
Show More
@@ -84,6 +84,13 b' void debugmsg(const char *fmt, ...)'
84 84 va_end(args);
85 85 }
86 86
87 void fchdirx(int dirfd)
88 {
89 int r = fchdir(dirfd);
90 if (r == -1)
91 abortmsgerrno("failed to fchdir");
92 }
93
87 94 void *mallocx(size_t size)
88 95 {
89 96 void *result = malloc(size);
@@ -23,6 +23,7 b' void enablecolor(void);'
23 23 void enabledebugmsg(void);
24 24 void debugmsg(const char *fmt, ...) PRINTF_FORMAT_;
25 25
26 void fchdirx(int dirfd);
26 27 void *mallocx(size_t size);
27 28 void *reallocx(void *ptr, size_t size);
28 29
General Comments 0
You need to be logged in to leave comments. Login now