Skip to content

Commit

Permalink
add xinstall
Browse files Browse the repository at this point in the history
Signed-off-by: Ishimoto Shinobu <nagakamira@gmail.com>
  • Loading branch information
Ishimoto Shinobu committed Jul 26, 2020
1 parent cdd3755 commit c047a4e
Show file tree
Hide file tree
Showing 12 changed files with 2,083 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ src/users/users
src/ln/ln
src/stty/stty
src/fmt/fmt
src/xinstall/install
src/cmp/Makefile
src/diff/Makefile
src/diff3/Makefile
Expand All @@ -54,5 +55,6 @@ src/users/Makefile
src/ln/Makefile
src/fmt/Makefile
src/stty/Makefile
src/xinstall/Makefile
src/Makefile
ylwrap
3 changes: 2 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ AC_CONFIG_FILES([Makefile
src/users/Makefile
src/ln/Makefile
src/stty/Makefile
src/fmt/Makefile])
src/fmt/Makefile
src/xinstall/Makefile])
AC_OUTPUT
23 changes: 22 additions & 1 deletion include/bsd.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,23 @@
#define NMEADISC 7 /* NMEA0183 discipline */
/* TTY SHIT END */

/* stat */
#define S_BLKSIZE 512 /* block size used in the stat struct */
#define UF_NODUMP 0x00000001 /* do not dump file */
#define UF_IMMUTABLE 0x00000002 /* file may not be changed */
#define UF_APPEND 0x00000004 /* writes to file may only append */
#define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */
#define SF_IMMUTABLE 0x00020000 /* file may not be changed */
#define SF_APPEND 0x00040000 /* writes to file may only append */
#define SF_ARCHIVED 0x00010000 /* file is archived */
/* stat end */

#define EFTYPE 79 /* Inappropriate file type or format */
#define MAXBSIZE (64 * 1024)
#define S_ISTXT S_ISVTX
#define _PW_BUF_LEN 1024 /* length of getpw*_r buffer */
#define _GR_BUF_LEN (1024+200*sizeof(char*))

typedef va_list __va_list;
struct __sFILE;

Expand All @@ -110,4 +127,8 @@ __dead void verrc(int, int, const char *, __va_list)
__attribute__((__format__ (printf, 3, 0)));
extern const char* getprogname(void);
extern void setprogname(const char*);

int strtofflags(char **, u_int32_t *, u_int32_t *);
mode_t getmode(const void *, mode_t);
void *setmode(const char *);
int gid_from_group(const char *, gid_t *);
int uid_from_user(const char *, uid_t *);
2 changes: 1 addition & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SUBDIRS = libopenbsd cmp diff diff3 sdiff doas indent pr users ln stty fmt
SUBDIRS = libopenbsd cmp diff diff3 sdiff doas indent pr users ln stty fmt xinstall
3 changes: 3 additions & 0 deletions src/libopenbsd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ libopenbsd_a_SOURCES = \
fgetln.c \
fparseln.c \
getprogname.c \
pwcache.c \
readpassphrase.c \
reallocarray.c \
setmode.c \
setprogname.c \
strlcat.c \
strlcpy.c \
strtofflags.c \
strtonum.c \
verrc.c \
vwarnc.c \
Expand Down
Loading

0 comments on commit c047a4e

Please sign in to comment.