├── .gitignore ├── LICENSE ├── Makefile ├── Makefile.inc.sample ├── MinC.png ├── README.md ├── distrib ├── base.sh ├── bind.sh ├── binutils.sh ├── bitchx.sh ├── buildtools.nsi ├── bzip2.sh ├── comp.sh ├── curl.sh ├── email.sh ├── gcc.sh ├── git.sh ├── gmake.sh ├── hexedit.sh ├── images │ ├── make.bat │ ├── puf800X689.bmp │ └── puf800X689.gif ├── install.cmd ├── install.sh ├── lynx.sh ├── magick.sh ├── minc.nsi ├── mutt.sh ├── nano.sh ├── perl.sh ├── postinstall.cmd ├── release.sh ├── rsync.sh ├── sasl.sh ├── test.nsi ├── test.sh ├── uninstall.cmd ├── unzip.sh ├── vim.sh ├── vista.sh ├── wget.sh └── xz.sh ├── include ├── arch_posix.h ├── arch_types.h ├── bsd_posix.h ├── bsd_types.h ├── dev_types.h ├── msvc_posix.h ├── msvc_types.h ├── ntdll_posix.h ├── shell_types.h ├── vfs_posix.h ├── vfs_types.h ├── win │ ├── aclapi.h │ ├── basetsd.h │ ├── iphlpapi.h │ ├── ipifcons.h │ ├── iprtrmib.h │ ├── iptypes.h │ ├── lmerr.h │ ├── winbase.h │ ├── wincon.h │ ├── windef.h │ ├── windows.h │ ├── winerror.h │ ├── winnt.h │ ├── winsock2.h │ ├── winternl.h │ └── ws2ipdef.h ├── win_posix.h ├── win_types.h ├── ws2_posix.h └── ws2_types.h ├── libposix ├── Makefile ├── arch │ ├── Makefile │ └── x86 │ │ ├── fork.S │ │ └── syscall.S ├── compat.c ├── crt1.c ├── dev │ └── wscons │ │ └── wsconsio.c ├── grp.c ├── libposix.c ├── msvc.c ├── net │ ├── if.c │ ├── if_dl.c │ ├── if_var.c │ └── route.c ├── netinet │ ├── in.c │ ├── in_pcb.c │ ├── ip.c │ ├── tcp.c │ └── udp.c ├── netinet6 │ ├── in6.c │ └── ip6.c ├── pwd.c ├── string.c ├── sys │ ├── dirent.c │ ├── dkio.c │ ├── errno.c │ ├── fcntl.c │ ├── file.c │ ├── filio.c │ ├── ioctl.c │ ├── kernel.c │ ├── ktrace.c │ ├── mman.c │ ├── mount.c │ ├── msg.c │ ├── msgbuf.c │ ├── mtio.c │ ├── namei.c │ ├── pciio.c │ ├── poll.c │ ├── proc.c │ ├── reboot.c │ ├── resource.c │ ├── sched.c │ ├── select.c │ ├── sem.c │ ├── signal.c │ ├── socket.c │ ├── sockio.c │ ├── stat.c │ ├── swap.c │ ├── syscall.c │ ├── sysctl.c │ ├── systm.c │ ├── termio.c │ ├── time.c │ ├── tty.c │ ├── uio.c │ ├── unistd.c │ ├── vnode.c │ └── wait.c ├── utime.c ├── version.rc ├── vfs │ ├── char │ │ ├── char.c │ │ ├── char_ansi.c │ │ ├── char_console.c │ │ ├── char_fcntl.c │ │ ├── char_filio.c │ │ ├── char_input.c │ │ ├── char_interix.c │ │ ├── char_namei.c │ │ ├── char_null.c │ │ ├── char_poll.c │ │ ├── char_screen.c │ │ ├── char_syscall.c │ │ ├── char_termio.c │ │ ├── char_unistd.c │ │ └── char_vt100.c │ ├── disk │ │ ├── directory │ │ │ ├── directory.c │ │ │ ├── directory_fcntl.c │ │ │ ├── directory_stat.c │ │ │ └── directory_unistd.c │ │ ├── disk.c │ │ ├── disk_dirent.c │ │ ├── disk_fcntl.c │ │ ├── disk_namei.c │ │ ├── disk_poll.c │ │ ├── disk_stat.c │ │ ├── disk_syscall.c │ │ ├── disk_sysctl.c │ │ ├── disk_time.c │ │ ├── disk_unistd.c │ │ ├── file │ │ │ ├── file.c │ │ │ ├── file_fcntl.c │ │ │ ├── file_stat.c │ │ │ └── file_unistd.c │ │ └── link │ │ │ ├── link.c │ │ │ ├── link_stat.c │ │ │ └── link_unistd.c │ ├── drive │ │ ├── drive.c │ │ ├── drive_device.c │ │ ├── drive_mount.c │ │ ├── drive_namei.c │ │ └── drive_statvfs.c │ ├── mailslot │ │ ├── mailslot.c │ │ ├── mailslot_fcntl.c │ │ ├── mailslot_poll.c │ │ ├── mailslot_stat.c │ │ ├── mailslot_syscall.c │ │ └── mailslot_unistd.c │ ├── pdo │ │ ├── pdo.c │ │ ├── pdo_device.c │ │ ├── pdo_dkio.c │ │ ├── pdo_fcntl.c │ │ ├── pdo_mount.c │ │ ├── pdo_poll.c │ │ ├── pdo_ptm.c │ │ ├── pdo_random.c │ │ ├── pdo_root.c │ │ ├── pdo_route.c │ │ ├── pdo_stat.c │ │ ├── pdo_statvfs.c │ │ ├── pdo_syscall.c │ │ ├── pdo_termio.c │ │ ├── pdo_unistd.c │ │ └── pdo_wsconsio.c │ ├── pipe │ │ ├── fifo │ │ │ ├── fifo.c │ │ │ ├── fifo_poll.c │ │ │ └── fifo_unistd.c │ │ ├── pipe.c │ │ ├── pipe_fcntl.c │ │ ├── pipe_filio.c │ │ ├── pipe_namei.c │ │ ├── pipe_poll.c │ │ ├── pipe_socket.c │ │ ├── pipe_stat.c │ │ ├── pipe_syscall.c │ │ ├── pipe_unistd.c │ │ └── socket │ │ │ ├── socket.c │ │ │ ├── socket_poll.c │ │ │ ├── socket_select.c │ │ │ └── socket_unistd.c │ ├── process │ │ ├── process.c │ │ ├── process_poll.c │ │ ├── process_sched.c │ │ ├── process_stdlib.c │ │ ├── process_syscall.c │ │ └── process_unistd.c │ ├── registry │ │ ├── registry.c │ │ ├── registry_fcntl.c │ │ ├── registry_namei.c │ │ ├── registry_termio.c │ │ └── registry_unistd.c │ ├── shell │ │ ├── shell.c │ │ ├── shell_namei.c │ │ ├── shell_stat.c │ │ └── shell_unistd.c │ ├── vfs.c │ ├── vfs_acl.c │ ├── vfs_device.c │ ├── vfs_dirent.c │ ├── vfs_event.c │ ├── vfs_fcntl.c │ ├── vfs_filio.c │ ├── vfs_ktrace.c │ ├── vfs_libgen.c │ ├── vfs_mount.c │ ├── vfs_namei.c │ ├── vfs_poll.c │ ├── vfs_reboot.c │ ├── vfs_resource.c │ ├── vfs_shm.c │ ├── vfs_signal.c │ ├── vfs_socket.c │ ├── vfs_stat.c │ ├── vfs_statvfs.c │ ├── vfs_stdlib.c │ ├── vfs_syscall.c │ ├── vfs_systm.c │ ├── vfs_termio.c │ ├── vfs_time.c │ ├── vfs_tty.c │ ├── vfs_uio.c │ ├── vfs_unistd.c │ ├── vfs_wait.c │ ├── volume │ │ ├── volume.c │ │ └── volume_stat.c │ └── winsock │ │ ├── winsock.c │ │ ├── winsock_device.c │ │ ├── winsock_fcntl.c │ │ ├── winsock_filio.c │ │ ├── winsock_if.c │ │ ├── winsock_ifaddrs.c │ │ ├── winsock_poll.c │ │ ├── winsock_socket.c │ │ ├── winsock_sockio.c │ │ ├── winsock_stat.c │ │ ├── winsock_statvfs.c │ │ ├── winsock_syscall.c │ │ ├── winsock_sysctl.c │ │ └── winsock_unistd.c └── win │ ├── win.c │ ├── win_acl.c │ ├── win_capability.c │ ├── win_dlfcn.c │ ├── win_fcntl.c │ ├── win_grp.c │ ├── win_libgen.c │ ├── win_mman.c │ ├── win_pwd.c │ ├── win_sem.c │ ├── win_signal.c │ ├── win_stdlib.c │ ├── win_string.c │ ├── win_syscall.c │ ├── win_sysctl.c │ ├── win_time.c │ ├── win_uio.c │ ├── win_unistd.c │ └── win_wchar.c ├── libtrace ├── Makefile ├── config.h ├── libtrace.h ├── vfs │ ├── Makefile │ ├── VfsFileAttribs.c │ ├── VfsFileFlags.c │ ├── VfsInputMode.c │ ├── VfsNetEvents.c │ ├── VfsPathFlags.c │ ├── VfsScreenMode.c │ ├── VfsTaskFlags.c │ ├── VfsVolumeFlags.c │ ├── vfs_ACCESS.c │ ├── vfs_CAP_CONTROL.c │ ├── vfs_CFDATA.c │ ├── vfs_CONIN.c │ ├── vfs_DEVICE.c │ ├── vfs_INODE.c │ ├── vfs_MOUNT.c │ ├── vfs_NAMEI.c │ ├── vfs_NETFLAGS.c │ ├── vfs_STATFS.c │ ├── vfs_TASK.c │ ├── vfs_THREAD.c │ ├── vfs_TTY.c │ └── vfs_VNODE.c └── win │ ├── Makefile │ ├── WinAceFlags.c │ ├── WinFileAccess.c │ ├── WinFlagName.c │ ├── WinGroupAttribs.c │ ├── WinPrivilegeAttribs.c │ ├── WinSecurityFlags.c │ ├── win_ACL.c │ ├── win_SECURITY_DESCRIPTOR.c │ ├── win_SID.c │ ├── win_SID_RIGHTS.c │ ├── win_SYSTEM_INFO.c │ ├── win_TOKEN.c │ ├── win_TOKEN_GROUPS.c │ └── win_TOKEN_PRIVILEGES.c ├── mingw ├── Makefile ├── bin │ ├── Makefile │ └── scacls.c ├── gcc │ ├── Makefile │ ├── crt0.c │ ├── crt1.c │ ├── crtbegin.c │ ├── crtend.c │ ├── emutls.c │ ├── futimesat.c │ ├── gcrt0.c │ ├── gnu_mntent.c │ ├── gnu_mntent.h │ ├── libgcc_eh.def │ ├── libgcc_s.def │ ├── libgcc_s_dw2-1.def │ ├── mempcpy.c │ ├── pe-openbsd.h │ ├── sbrk.c │ └── wintls.c ├── libadvapi32.def ├── libgmon.def ├── libkernel32.def ├── libmoldname.def ├── libshell32.def └── libuser32.def ├── mount.sh.sample ├── openbsd ├── Makefile ├── include │ ├── a.out.h │ ├── ar.h │ ├── arpa │ │ ├── ftp.h │ │ ├── inet.h │ │ ├── nameser.h │ │ ├── telnet.h │ │ └── tftp.h │ ├── asr.h │ ├── assert.h │ ├── bitstring.h │ ├── blf.h │ ├── bsd_auth.h │ ├── complex.h │ ├── ctype.h │ ├── db.h │ ├── dbm.h │ ├── dirent.h │ ├── dlfcn.h │ ├── err.h │ ├── errno.h │ ├── fenv.h │ ├── float.h │ ├── fnmatch.h │ ├── fstab.h │ ├── fts.h │ ├── ftw.h │ ├── getopt.h │ ├── glob.h │ ├── grp.h │ ├── ieeefp.h │ ├── ifaddrs.h │ ├── inttypes.h │ ├── kvm.h │ ├── langinfo.h │ ├── libgen.h │ ├── limits.h │ ├── locale.h │ ├── login_cap.h │ ├── malloc.h │ ├── math.h │ ├── md5.h │ ├── memory.h │ ├── mpool.h │ ├── ndbm.h │ ├── netdb.h │ ├── netgroup.h │ ├── nl_types.h │ ├── nlist.h │ ├── paths.h │ ├── poll.h │ ├── protocols │ │ └── talkd.h │ ├── pwd.h │ ├── readpassphrase.h │ ├── regex.h │ ├── resolv.h │ ├── rmd160.h │ ├── rpc │ │ ├── auth.h │ │ ├── auth_unix.h │ │ ├── clnt.h │ │ ├── pmap_clnt.h │ │ ├── pmap_prot.h │ │ ├── pmap_rmt.h │ │ ├── rpc.h │ │ ├── rpc_msg.h │ │ ├── svc.h │ │ ├── svc_auth.h │ │ ├── types.h │ │ └── xdr.h │ ├── rpcsvc │ │ ├── yp_prot.h │ │ └── ypclnt.h │ ├── search.h │ ├── setjmp.h │ ├── sha1.h │ ├── sha2.h │ ├── signal.h │ ├── stdbool.h │ ├── stddef.h │ ├── stdio.h │ ├── stdlib.h │ ├── string.h │ ├── strings.h │ ├── sysexits.h │ ├── time.h │ ├── ttyent.h │ ├── tzfile.h │ ├── unistd.h │ ├── utime.h │ ├── utmp.h │ ├── vis.h │ ├── wchar.h │ └── wctype.h ├── lib │ ├── Makefile │ ├── libc │ │ ├── Makefile │ │ ├── arch │ │ │ ├── Makefile │ │ │ └── i386 │ │ │ │ ├── SYS.h │ │ │ │ ├── gen │ │ │ │ └── Makefile │ │ │ │ ├── net │ │ │ │ └── Makefile │ │ │ │ ├── string │ │ │ │ └── Makefile │ │ │ │ └── sys │ │ │ │ ├── Makefile │ │ │ │ ├── _exit.S │ │ │ │ ├── _getlogin.S │ │ │ │ ├── _setlogin.S │ │ │ │ ├── cerror.S │ │ │ │ ├── fork.S │ │ │ │ ├── syscall.S │ │ │ │ └── vfork.S │ │ ├── citrus │ │ │ └── Makefile │ │ ├── compat-43 │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ ├── crypt │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ ├── db │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ ├── btree │ │ │ │ └── Makefile │ │ │ ├── db │ │ │ │ └── Makefile │ │ │ ├── hash │ │ │ │ └── Makefile │ │ │ ├── mpool │ │ │ │ └── Makefile │ │ │ └── recno │ │ │ │ └── Makefile │ │ ├── dlfcn │ │ │ └── Makefile │ │ ├── gdtoa │ │ │ └── Makefile │ │ ├── gen │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ ├── fts.c │ │ │ ├── getgrent.c │ │ │ ├── getgrouplist.c │ │ │ ├── getloadavg.c │ │ │ ├── getprogname.c │ │ │ ├── getpwent.c │ │ │ ├── setproctitle.c │ │ │ ├── setprogname.c │ │ │ └── signal.c │ │ ├── gmon │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ └── mcount.c │ │ ├── hash │ │ │ ├── Makefile │ │ │ ├── md5.c │ │ │ ├── md5hl.c │ │ │ ├── rmd160hl.c │ │ │ ├── sha1hl.c │ │ │ ├── sha224hl.c │ │ │ ├── sha256hl.c │ │ │ ├── sha384hl.c │ │ │ └── sha512hl.c │ │ ├── include │ │ │ ├── ctype_private.h │ │ │ ├── namespace.h │ │ │ ├── sys │ │ │ │ └── localedef.h │ │ │ └── thread_private.h │ │ ├── libc.c │ │ ├── libmsvcrt.def │ │ ├── locale │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ └── runetable.c │ │ ├── net │ │ │ └── Makefile │ │ ├── nls │ │ │ └── Makefile │ │ ├── quad │ │ │ └── Makefile │ │ ├── regex │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ ├── stdio │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ ├── stdlib │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ ├── Makefile.bsd │ │ │ └── atexit.c │ │ ├── string │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ ├── sys │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ ├── syscall.sh │ │ │ └── syscall.template │ │ ├── termios │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ ├── thread │ │ │ └── Makefile │ │ ├── time │ │ │ ├── BSDmakefile │ │ │ └── Makefile │ │ └── version.rc │ ├── libdl │ │ ├── Makefile │ │ ├── dlfcn.c │ │ ├── libdl.c │ │ └── version.rc │ ├── libsocket │ │ ├── Makefile │ │ ├── asr │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ ├── asr.c │ │ │ └── res_init.c │ │ ├── crt1.c │ │ ├── net │ │ │ ├── BSDmakefile │ │ │ ├── Makefile │ │ │ ├── getservent.c │ │ │ ├── if_indextoname.c │ │ │ ├── if_nametoindex.c │ │ │ └── linkaddr.c │ │ ├── rpc │ │ │ └── Makefile │ │ └── version.rc │ └── libutil │ │ ├── BSDmakefile │ │ ├── Makefile │ │ └── pidfile.c └── sys │ ├── arch │ └── i386 │ │ └── include │ │ ├── _float.h │ │ ├── _types.h │ │ ├── asm.h │ │ ├── atomic.h │ │ ├── biosvar.h │ │ ├── bus.h │ │ ├── cdefs.h │ │ ├── cpu.h │ │ ├── cputypes.h │ │ ├── disklabel.h │ │ ├── endian.h │ │ ├── exec.h │ │ ├── fenv.h │ │ ├── frame.h │ │ ├── ieee.h │ │ ├── ieeefp.h │ │ ├── intr.h │ │ ├── intrdefs.h │ │ ├── limits.h │ │ ├── lock.h │ │ ├── mutex.h │ │ ├── npx.h │ │ ├── param.h │ │ ├── pcb.h │ │ ├── pic.h │ │ ├── pio.h │ │ ├── pmap.h │ │ ├── proc.h │ │ ├── profile.h │ │ ├── psl.h │ │ ├── pte.h │ │ ├── ptrace.h │ │ ├── segments.h │ │ ├── setjmp.h │ │ ├── signal.h │ │ ├── specialreg.h │ │ ├── stdarg.h │ │ ├── sysarch.h │ │ ├── trap.h │ │ ├── tss.h │ │ └── vmparam.h │ ├── dev │ ├── pci │ │ ├── pcidevs.h │ │ ├── pcidevs_data.h │ │ └── pcireg.h │ └── wscons │ │ ├── wsconsio.h │ │ └── wsksymvar.h │ ├── kern │ ├── init_sysent.c │ ├── makesyscalls.sh │ ├── syscalls.c │ ├── syscalls.conf │ └── syscalls.master │ ├── net │ ├── bpf.h │ ├── ethertypes.h │ ├── hfsc.h │ ├── if.h │ ├── if_arp.h │ ├── if_bridge.h │ ├── if_dl.h │ ├── if_enc.h │ ├── if_media.h │ ├── if_pflog.h │ ├── if_pflow.h │ ├── if_pfsync.h │ ├── if_pppoe.h │ ├── if_sppp.h │ ├── if_trunk.h │ ├── if_types.h │ ├── if_var.h │ ├── if_vlan_var.h │ ├── pfkeyv2.h │ ├── pfvar.h │ ├── ppp_defs.h │ ├── radix.h │ ├── radix_mpath.h │ └── route.h │ ├── net80211 │ ├── ieee80211.h │ ├── ieee80211_ioctl.h │ └── ieee80211_radiotap.h │ ├── netinet │ ├── icmp6.h │ ├── if_ether.h │ ├── in.h │ ├── in_pcb.h │ ├── in_systm.h │ ├── in_var.h │ ├── ip.h │ ├── ip6.h │ ├── ip_ah.h │ ├── ip_carp.h │ ├── ip_icmp.h │ ├── ip_ipsp.h │ ├── ip_var.h │ ├── tcp.h │ ├── tcp_fsm.h │ ├── tcp_timer.h │ ├── tcp_var.h │ ├── tcpip.h │ ├── udp.h │ └── udp_var.h │ ├── netinet6 │ ├── in6.h │ ├── in6_var.h │ ├── ip6_var.h │ └── nd6.h │ ├── netmpls │ └── mpls.h │ ├── nfs │ ├── nfs.h │ ├── nfsproto.h │ └── rpcv2.h │ ├── sys │ ├── _time.h │ ├── _types.h │ ├── acct.h │ ├── buf.h │ ├── cdefs.h │ ├── cdio.h │ ├── chio.h │ ├── conf.h │ ├── core.h │ ├── device.h │ ├── dir.h │ ├── dirent.h │ ├── disk.h │ ├── disklabel.h │ ├── dkio.h │ ├── dkstat.h │ ├── endian.h │ ├── errno.h │ ├── evcount.h │ ├── event.h │ ├── exec.h │ ├── exec_elf.h │ ├── fcntl.h │ ├── file.h │ ├── filio.h │ ├── gmon.h │ ├── ioccom.h │ ├── ioctl.h │ ├── ioctl_compat.h │ ├── ipc.h │ ├── kernel.h │ ├── ktrace.h │ ├── limits.h │ ├── lkm.h │ ├── lock.h │ ├── malloc.h │ ├── mbuf.h │ ├── mman.h │ ├── mount.h │ ├── msg.h │ ├── msgbuf.h │ ├── mtio.h │ ├── mutex.h │ ├── namei.h │ ├── param.h │ ├── pciio.h │ ├── poll.h │ ├── pool.h │ ├── proc.h │ ├── protosw.h │ ├── queue.h │ ├── reboot.h │ ├── resource.h │ ├── rwlock.h │ ├── sched.h │ ├── select.h │ ├── selinfo.h │ ├── sem.h │ ├── sensors.h │ ├── shm.h │ ├── siginfo.h │ ├── signal.h │ ├── socket.h │ ├── socketvar.h │ ├── sockio.h │ ├── stat.h │ ├── statvfs.h │ ├── stdarg.h │ ├── stdint.h │ ├── swap.h │ ├── syscall.h │ ├── syscallargs.h │ ├── sysctl.h │ ├── syslimits.h │ ├── syslog.h │ ├── systm.h │ ├── task.h │ ├── termios.h │ ├── time.h │ ├── timeout.h │ ├── times.h │ ├── tree.h │ ├── tty.h │ ├── ttycom.h │ ├── ttydefaults.h │ ├── types.h │ ├── ucred.h │ ├── uio.h │ ├── un.h │ ├── unistd.h │ ├── utsname.h │ ├── vnode.h │ └── wait.h │ └── uvm │ ├── uvm_extern.h │ ├── uvm_object.h │ ├── uvm_param.h │ └── uvm_vnode.h └── sbin ├── Makefile ├── bsd.c ├── bsd.rc ├── libwtrace.c ├── mkent.c ├── wrc.c └── wtrace.c /.gitignore: -------------------------------------------------------------------------------- 1 | Makefile.inc 2 | mount.sh 3 | *.exe 4 | *.dll 5 | *.so 6 | *.o 7 | *.a 8 | *.tar 9 | *.out 10 | *.tgz 11 | *.so.* 12 | openbsd/lib/libc/sys/*.S 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 Daniel Boland . 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 1. Redistributions of source code must retain the above copyright 8 | notice, this list of conditions and the following disclaimer. 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 3. Neither the name of the copyright holders nor the names of its 13 | contributors may be used to endorse or promote products derived 14 | from this software without specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 20 | HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 22 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 23 | OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 25 | TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 26 | USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 27 | DAMAGE. 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .DEFAULT: 2 | .SUFFIXES: 3 | 4 | usage: 5 | @echo "usage: make TARGET" 6 | @echo 7 | @echo "Targets:" 8 | @echo " all build all targets" 9 | @echo " kernel build libposix only" 10 | @echo " libs build BSD system libraries only" 11 | @echo " includes install header files locally" 12 | @echo " sbin buid MinC system programs only" 13 | 14 | %.d: % 15 | @${MAKE} -C $< 16 | 17 | all: Makefile.inc mount.sh 18 | @${MAKE} -C openbsd includes-local 19 | @${MAKE} -C mingw all install-local 20 | @${MAKE} -C libtrace all 21 | @${MAKE} -C libposix all install-local 22 | @${MAKE} -C openbsd all install-local 23 | 24 | kernel: 25 | @${MAKE} -C libposix all install-local 26 | 27 | includes: 28 | @${MAKE} -C openbsd includes-local 29 | 30 | libs: openbsd.d 31 | 32 | sbin: libtrace.d 33 | @${MAKE} -C sbin all install 34 | 35 | Makefile.inc: 36 | /bin/cp Makefile.inc.sample Makefile.inc 37 | 38 | mount.sh: 39 | /bin/cp mount.sh.sample mount.sh 40 | 41 | clean: 42 | @${MAKE} -C libtrace clean 43 | @${MAKE} -C libposix clean 44 | @${MAKE} -C mingw clean 45 | @${MAKE} -C sbin clean 46 | @${MAKE} -C openbsd clean 47 | 48 | install: 49 | @${MAKE} -C libposix install 50 | @${MAKE} -C openbsd install 51 | -------------------------------------------------------------------------------- /Makefile.inc.sample: -------------------------------------------------------------------------------- 1 | VERSION=20240915 2 | BUILD=$(shell date +%s) 3 | DESTDIR=/C/MinC 4 | GCCVER=4.8.1 5 | MINGW=/C/MinGW 6 | SRCDIR=/D/openbsd-master 7 | 8 | .SUFFIXES: 9 | .DEFAULT: 10 | 11 | # PIC default: 0x10000000 (library space) 12 | # PIE default: 0x00400000 (program space) 13 | 14 | IMGBASE_LIBD= 0x0FF80000 # (500K) 15 | IMGBASE_LIBPOSIX= 0x0FF00000 # (500K) 16 | IMGBASE_LIBC= 0x0FE00000 17 | IMGBASE_LIBSOCKET= 0x0FD00000 18 | IMGBASE_LIBEDIT= 0x0FC00000 19 | #LIBUTIL_IMGBASE= 0x0FB00000 20 | #LIBZ_IMGBASE= 0x0FA00000 21 | IMGBASE_LIBCURL= 0x0F900000 22 | LIBPERL_IMGBASE= 0x0F600000 # (3MB) 23 | 24 | PREFIX=/usr 25 | BINDIR=/bin 26 | SBINDIR=/sbin 27 | UBINDIR=${PREFIX}/bin 28 | LIBDIR=${PREFIX}/lib 29 | INCDIR=${PREFIX}/include 30 | SHDIR=${PREFIX}/share 31 | MANDIR=${SHDIR}/man 32 | 33 | CFLAGS= -Wimplicit-function-declaration -Werror -ffixed-bx -ffreestanding 34 | LDFLAGS= --disable-auto-import 35 | -------------------------------------------------------------------------------- /MinC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/MinC.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MinC Is Not Cygwin 2 | 3 | MinC was written to help children at vocational education learn Linux without the 4 | hassle of virtualization. It runs on Windows NT, version 2000/XP/2003/Vista/7/8/10/11. 5 | 6 | MinC has a tiny kernel emulation (285Kb) which runs on Windows. The rest of the software was 7 | taken verbatim from OpenBSD, version 6.1. This means that by installing MinC, you run OpenBSD 8 | on your Windows machine at native speed. 9 | 10 | I wanted the kernel emulation to be as simple as possible, so unexperienced programmers 11 | can contribute to the project. The project has already been discussed on Hacker News, but I plan 12 | to do a write-up with the design decisions I made. 13 | 14 | ![MinC](MinC.png) 15 | 16 | To build MinC from scratch you need the MinGW GCC build tools. It is not advisable 17 | to attempt this at the moment. The build process is not yet fully automated. 18 | 19 | For downloading the installer and more information go to: https://minc.commandlinerevolution.nl/english/home.html 20 | -------------------------------------------------------------------------------- /distrib/base.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/../minc-base"; then 5 | exit 1 6 | fi 7 | 8 | copy_file /sbin "$SBIN" 9 | 10 | echo -n "Inpakken base61.tgz... " 11 | tar -zcf $DISTROOT/base61.tgz * 12 | echo gereed. 13 | -------------------------------------------------------------------------------- /distrib/bind.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/bind-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken bind93.tgz... " 9 | tar -zcf $DISTROOT/bind93.tgz usr/bin usr/share/man/man1 10 | echo gereed. 11 | -------------------------------------------------------------------------------- /distrib/binutils.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/binutils-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken binutils228.tgz... " 9 | tar -zcf $DISTROOT/binutils228.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/bitchx.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/BitchX-release"; then 5 | exit 1 6 | fi 7 | 8 | bunzip2 ./usr/share/man/man1/BitchX.1.bz2 2>/dev/null 9 | 10 | #rm -f ./usr/bin/BitchX 11 | #cp -p /usr/bin/BitchX ./usr/bin/BitchX 12 | 13 | echo -n "Inpakken bitchx12.tgz... " 14 | tar -zcf $DISTROOT/bitchx12.tgz * 15 | echo gereed. 16 | -------------------------------------------------------------------------------- /distrib/bzip2.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/bzip-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken bzip210.tgz... " 9 | tar -zcf $DISTROOT/bzip210.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/comp.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/../minc-comp"; then 5 | exit 1 6 | fi 7 | 8 | cp -p /usr/lib/crt0.o ./usr/lib/ 9 | cp -p /usr/lib/crt1.o ./usr/lib/ 10 | cp -p /usr/lib/gcrt0.o ./usr/lib/ 11 | 12 | cp -p /usr/lib/libc.a ./usr/lib/ 13 | cp -p /usr/lib/libsocket.a ./usr/lib/ 14 | 15 | # don't overwrite base libs 16 | rm -f ./usr/lib/libcrypto.so.27.0 17 | rm -f ./usr/lib/libssl.so.24.1 18 | rm -f ./usr/lib/libutil.so.12.1 19 | 20 | echo -n "Inpakken comp61.tgz... " 21 | tar -zcf $DISTROOT/comp61.tgz * 22 | echo gereed. 23 | -------------------------------------------------------------------------------- /distrib/curl.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/curl-release"; then 5 | exit 1 6 | fi 7 | 8 | ln -s libcurl.so.10.0 ./usr/lib/libcurl.so 2>/dev/null 9 | 10 | echo -n "Inpakken curl772.tgz... " 11 | tar -zcf $DISTROOT/curl772.tgz * 12 | echo gereed. 13 | -------------------------------------------------------------------------------- /distrib/email.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/eMail-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken email32.tgz... " 9 | tar -zcf $DISTROOT/email32.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/gcc.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/gcc-release"; then 5 | exit 1 6 | fi 7 | 8 | ln -s gcc ./usr/bin/cc 2>/dev/null 9 | ln -s liblto_plugin.so.0.0 ./usr/libexec/gcc/i686-pe-openbsd/4.8.1/liblto_plugin.so 2>/dev/null 10 | 11 | mkdir -p ./sbin 12 | cp /mnt/c/MinGW/bin/libstdc++-6.dll ./sbin/ 13 | cp /mnt/c/MinGW/bin/libgcc_s_dw2-1.dll ./sbin/ 14 | 15 | echo -n "Inpakken gcc481.tgz... " 16 | tar -zcf $DISTROOT/gcc481.tgz * 17 | echo gereed. 18 | 19 | -------------------------------------------------------------------------------- /distrib/git.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/git-release"; then 5 | exit 1 6 | fi 7 | 8 | mkdir -p etc 9 | cp -p /etc/gitconfig ./etc/ 10 | 11 | mkdir -p ./usr/share/man 12 | echo -n "Uitpakken man pagina's... " 13 | xz --decompress --stdout ../git-manpages-2.31.1.tar.xz | tar -C ./usr/share/man -xf - 14 | echo gereed. 15 | 16 | echo -n "Inpakken git231.tgz... " 17 | tar -zcf $DISTROOT/git231.tgz * 18 | echo gereed. 19 | -------------------------------------------------------------------------------- /distrib/gmake.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/make-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken gmake42.tgz... " 9 | tar -zcf $DISTROOT/gmake42.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/hexedit.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/hexedit-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken hexedit12.tgz... " 9 | tar -zcf $DISTROOT/hexedit12.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/images/make.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | convert puf800X689.gif -geometry x50 -flop -background #FFFFFF -flatten BMP3:puf800X689.bmp 4 | -------------------------------------------------------------------------------- /distrib/images/puf800X689.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/distrib/images/puf800X689.bmp -------------------------------------------------------------------------------- /distrib/images/puf800X689.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/distrib/images/puf800X689.gif -------------------------------------------------------------------------------- /distrib/install.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | SET ROOT=%cd% 4 | SET Path=%ROOT%\miniroot;%ROOT%\usr\lib;%Path% 5 | 6 | gzip -dc %~1 | tar -C / -xf - 7 | 8 | DEL %~1 9 | -------------------------------------------------------------------------------- /distrib/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | DESTDIR=/mnt/d/minc-base 4 | MANDIR=/usr/share/man 5 | 6 | BIN='ksh' 7 | LIB='libc.so.75.0 libsocket.so.75.0' 8 | #LIB="${LIB} libcrypto.so.27.0 libutil.so.12.1" 9 | #LIB="${LIB} libssl.so.24.1 libedit.so.5.1 libkvm.so.16.0 libsqlite3.so.27.0" 10 | ETC='man.conf login.conf magic profile MAKEDEV console.reg syslog.conf ttys vi.exrc' 11 | LOCALE='ARMSCII-8 ISO8859-2 KOI8-U CP1251 ISO8859-4 UTF-8 CP866 ISO8859-5 ISO8859-1 ISO8859-7 ISO8859-13 12 | ISO8859-9 ISO8859-15 KOI8-R' 13 | LIBEXEC='iptables-list.sh ncurses ld.so' 14 | 15 | function copy_dir { 16 | for dir in $2; do 17 | cp -R -p "$1/$dir" ".$1/" 18 | done 19 | } 20 | function copy_bin { 21 | for file in $2; do 22 | cp -p "$1/$file" ".$1/" 23 | done 24 | } 25 | function copy_posix { 26 | for file in $2; do 27 | cp -p "$1/$file" ".$1/" 28 | cp -p "$MANDIR/man1/$file.1" ".$MANDIR/man1/" 29 | done 30 | } 31 | 32 | if ! cd $DESTDIR; then 33 | exit 1 34 | fi 35 | 36 | mkdir -p ./usr/share/man/man1 37 | 38 | mkdir -p ./bin 39 | copy_bin /bin "$BIN" 40 | ln ./bin/ksh ./bin/sh 41 | 42 | cp -p "$MANDIR/man1/ksh.1" ".$MANDIR/man1/" 43 | cp -p "$MANDIR/man1/sh.1" ".$MANDIR/man1/" 44 | 45 | mkdir -p ./usr/lib 46 | copy_bin /usr/lib "$LIB" 47 | 48 | mkdir -p ./usr/libexec 49 | copy_bin /usr/libexec "$LIBEXEC" 50 | 51 | #mkdir -p ./usr/share/terminfo 52 | #copy_dir /usr/share "terminfo" 53 | 54 | mkdir -p ./etc 55 | copy_bin /etc "$ETC" 56 | copy_dir /etc "ssl" 57 | copy_dir /etc "color" 58 | 59 | #copy_dir /usr/share/locale "$LOCALE" 60 | #copy_dir /usr/share "misc" 61 | -------------------------------------------------------------------------------- /distrib/lynx.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/lynx-release"; then 5 | exit 1 6 | fi 7 | 8 | mkdir -p bin 9 | ln -sf /usr/bin/gzip ./bin/gzip 10 | 11 | echo -n "Inpakken lynx28.tgz... " 12 | tar -zcf $DISTROOT/lynx28.tgz * 13 | echo gereed. 14 | 15 | -------------------------------------------------------------------------------- /distrib/magick.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/ImageMagick-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken magick710.tgz... " 9 | tar -zcf $DISTROOT/magick710.tgz etc usr/bin usr/share/man 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/mutt.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/mutt-release"; then 5 | exit 1 6 | fi 7 | 8 | cp /etc/Muttrc ./etc/Muttrc 9 | 10 | echo -n "Inpakken mutt20.tgz... " 11 | tar -zcf $DISTROOT/mutt20.tgz * 12 | echo gereed. 13 | 14 | -------------------------------------------------------------------------------- /distrib/nano.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/nano-release"; then 5 | exit 1 6 | fi 7 | 8 | mkdir -p ./etc 9 | cp -p /etc/nanorc ./etc/nanorc 10 | 11 | echo -n "Inpakken nano64.tgz... " 12 | tar -zcf $DISTROOT/nano64.tgz * 13 | echo gereed. 14 | -------------------------------------------------------------------------------- /distrib/perl.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/perl-release"; then 5 | exit 1 6 | fi 7 | 8 | MODS='B Compress Encode POSIX PerlIO Storable Unicode re' 9 | 10 | function rm_modules { 11 | for mod in $1; do 12 | echo -n "${mod} " 13 | rm -rf ./usr/lib/perl5/5.30.0/OpenBSD.i386-openbsd-multi/auto/${mod} 14 | done 15 | } 16 | 17 | cp ./usr/lib/perl5/5.30.0/OpenBSD.i386-openbsd-multi/CORE/libperl.so ./usr/lib/ 18 | 19 | echo -n "Verwijderen modules... " 20 | rm_modules "${MODS}" 21 | rm -rf ./usr/lib/perl5/5.30.0/Pod 22 | echo gereed. 23 | 24 | echo -n "Inpakken perl53.tgz... " 25 | tar -zcf $DISTROOT/perl53.tgz * 26 | echo gereed. 27 | 28 | -------------------------------------------------------------------------------- /distrib/postinstall.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | SET ROOT=%cd% 4 | SET Path=%ROOT%\miniroot;%ROOT%\usr\lib;%Path% 5 | 6 | miniroot\sh -c /sbin/setup.sh 7 | regedit /S .\etc\console.reg 8 | regedit /S .\etc\color\%~1.reg 9 | -------------------------------------------------------------------------------- /distrib/release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ROOT=/mnt/d/libminc-0.6.1 4 | #RELEASE=/mnt/d/minc-base 5 | PKGROOT=/mnt/d/src 6 | 7 | DISTROOT=${ROOT}/distrib 8 | MINIROOT=${DISTROOT}/miniroot 9 | LATEST=/mnt/d/commandlinerevolution.nl/minc/release 10 | 11 | SBIN='libposix-6.1.0.dll bsd.exe mkent wrc setup.sh wtrace iptables color terminal.cmd mount_refs' 12 | 13 | copy_file() 14 | { 15 | for file in $2; do 16 | cp -p "$1/$file" ".$1/$file" 17 | done 18 | } 19 | 20 | if ! cd "$MINIROOT"; then 21 | exit 1 22 | fi 23 | 24 | cp /bin/tar tar.exe 25 | cp /bin/chmod chmod.exe 26 | cp /bin/sh sh.exe 27 | cp /sbin/libposix-6.1.0.dll . 28 | cp ${ROOT}/mingw/bin/scacls.exe . 29 | cp /mnt/d/src/gzip-1.13/gzip.exe . 30 | 31 | #. $DISTROOT/test.sh 32 | #. $DISTROOT/comp.sh 33 | . $DISTROOT/base.sh 34 | 35 | #. $DISTROOT/vista.sh 36 | #. $DISTROOT/vim.sh 37 | #. $DISTROOT/nano.sh 38 | #. $DISTROOT/lynx.sh 39 | #. $DISTROOT/wget.sh 40 | #. $DISTROOT/curl.sh 41 | #. $DISTROOT/unzip.sh 42 | #. $DISTROOT/bzip2.sh 43 | #. $DISTROOT/email.sh 44 | #. $DISTROOT/hexedit.sh 45 | #. $DISTROOT/xz.sh 46 | #. $DISTROOT/mutt.sh 47 | #. $DISTROOT/bitchx.sh 48 | #. $DISTROOT/git.sh 49 | #. $DISTROOT/magick.sh 50 | #. $DISTROOT/rsync.sh 51 | #. $DISTROOT/binutils.sh 52 | #. $DISTROOT/gcc.sh 53 | #. $DISTROOT/gmake.sh 54 | #. $DISTROOT/perl.sh 55 | #. $DISTROOT/bind.sh 56 | #. $DISTROOT/sasl.sh 57 | 58 | wrc makensis "d:/libminc-0.6.1/distrib/minc.nsi" 59 | #wrc makensis "d:/libminc-0.6.1/distrib/buildtools.nsi" 60 | #wrc makensis "d:/libminc-0.6.1/distrib/test.nsi" 61 | #git archive --format=zip --prefix=minc-master/ -o release/source/minc-master.zip HEAD 62 | -------------------------------------------------------------------------------- /distrib/rsync.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/rsync-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken rsync322.tgz... " 9 | tar -zcf $DISTROOT/rsync322.tgz * 10 | echo gereed. 11 | -------------------------------------------------------------------------------- /distrib/sasl.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/cyrus-sasl-release"; then 5 | exit 1 6 | fi 7 | 8 | chmod +x ./usr/lib/libsasl2.so.3.0 9 | ls ./usr/lib/sasl2/*.so.* | xargs chmod +x 10 | ln -s libsasl2.so.3.0 ./usr/lib/libsasl2.so 2>/dev/null 11 | 12 | echo -n "Inpakken sasl2128.tgz... " 13 | tar -zcf $DISTROOT/sasl2128.tgz * 14 | echo gereed. 15 | -------------------------------------------------------------------------------- /distrib/test.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/../minc-test"; then 5 | exit 1 6 | fi 7 | 8 | copy_file /etc "MAKEDEV" 9 | copy_file /sbin "$SBIN" 10 | 11 | echo -n "Inpakken test61.tgz... " 12 | tar -zcf $DISTROOT/test61.tgz * 13 | echo gereed. 14 | -------------------------------------------------------------------------------- /distrib/uninstall.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | RMDIR /S /Q %~1 4 | -------------------------------------------------------------------------------- /distrib/unzip.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/unzip-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken unzip552.tgz... " 9 | tar -zcf $DISTROOT/unzip552.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/vim.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/vim-release"; then 5 | exit 1 6 | fi 7 | 8 | rm -f ./usr/bin/ex ./usr/bin/view 9 | find . -name ex.1 | xargs rm -f 10 | find . -name view.1 | xargs rm -f 11 | 12 | mkdir -p ./etc 13 | cp -p /usr/share/vim/vimrc ./usr/share/vim/vimrc 14 | ln -sf /usr/share/vim/vimrc ./etc/ 15 | 16 | echo -n "Inpakken vim81.tgz... " 17 | tar -zcf $DISTROOT/vim81.tgz * 18 | echo gereed. 19 | 20 | -------------------------------------------------------------------------------- /distrib/vista.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/../minc-vista"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken vista.tgz... " 9 | tar -zcf $DISTROOT/vista.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/wget.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/wget-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken wget118.tgz... " 9 | tar -zcf $DISTROOT/wget118.tgz * 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /distrib/xz.sh: -------------------------------------------------------------------------------- 1 | if ! [ -d "$DISTROOT" ]; then 2 | echo "$DISTROOT: No such directory" 3 | exit 1 4 | elif ! cd "$PKGROOT/xz-release"; then 5 | exit 1 6 | fi 7 | 8 | echo -n "Inpakken xz52.tgz... " 9 | tar -zcf $DISTROOT/xz52.tgz usr/bin usr/share/man 10 | echo gereed. 11 | 12 | -------------------------------------------------------------------------------- /include/arch_posix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | /* errno.c */ 32 | 33 | UINT errno_win(VOID); 34 | int errno_posix(UINT Error); 35 | 36 | /* stat.c */ 37 | 38 | int rid_posix(SID8 *Sid); 39 | SID8 *rid_win(SID8 *Buf, int rid); 40 | 41 | /* proc.c */ 42 | 43 | void task_init(char *cmdbuf, char *argv[], void *frame_address); 44 | 45 | /* namei.c */ 46 | 47 | char *path_posix(char *dest, LPCWSTR Source); 48 | char *pathp_posix(char *dest, LPCWSTR Source); 49 | 50 | -------------------------------------------------------------------------------- /include/msvc_posix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "msvc_types.h" 32 | 33 | int msvc_printf(const char *format, ...); 34 | void msvc_init(int *_argc, char ***_argv, char ***_env); 35 | 36 | /* internal.h */ 37 | 38 | int __getmainargs(int *_Argc, char ***_Argv, char ***_Env, int _DoWildCard, _startupinfo *_StartInfo); 39 | 40 | /* stdlib.h */ 41 | 42 | int rand(void); 43 | void srand(unsigned int seed); 44 | -------------------------------------------------------------------------------- /include/msvc_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | /* internal.h */ 32 | 33 | typedef struct { 34 | int newmode; 35 | } _startupinfo; 36 | -------------------------------------------------------------------------------- /include/ntdll_posix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | typedef struct _PUBLIC_OBJECT_BASIC_INFORMATION { 32 | ULONG Attributes; 33 | ACCESS_MASK GrantedAccess; 34 | ULONG HandleCount; 35 | ULONG PointerCount; 36 | ULONG Reserved[10]; // reserved for internal use 37 | } PUBLIC_OBJECT_BASIC_INFORMATION, *PPUBLIC_OBJECT_BASIC_INFORMATION; 38 | 39 | int sprintf(char *buf, const char *format, ...); 40 | char *_itoa(int value, char *buffer, int radix); 41 | int atoi(const char *str); 42 | int tolower(int c); 43 | -------------------------------------------------------------------------------- /include/win/basetsd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file basetsd.h 3 | * Copyright 2012, 2013 MinGW.org project 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the next 13 | * paragraph) shall be included in all copies or substantial portions of the 14 | * Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | typedef unsigned int UINT_PTR, *PUINT_PTR; 26 | typedef long LONG_PTR, *PLONG_PTR; 27 | typedef unsigned long ULONG_PTR, *PULONG_PTR; 28 | typedef ULONG_PTR SIZE_T, *PSIZE_T; 29 | typedef unsigned char UINT8; 30 | -------------------------------------------------------------------------------- /include/win/iphlpapi.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file iphlpapi.h 3 | * Copyright 2012, 2013 MinGW.org project 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the next 13 | * paragraph) shall be included in all copies or substantial portions of the 14 | * Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | #include "iptypes.h" 26 | #include "iprtrmib.h" 27 | #include "ipifcons.h" 28 | 29 | /* RFC: https://www.ietf.org/rfc/rfc1354.txt */ 30 | 31 | /* 32 | * ipexport.h 33 | */ 34 | 35 | #define MAX_ADAPTER_NAME 128 36 | 37 | typedef struct { 38 | ULONG Index; 39 | WCHAR Name[MAX_ADAPTER_NAME]; 40 | } IP_ADAPTER_INDEX_MAP, *PIP_ADAPTER_INDEX_MAP; 41 | 42 | typedef struct { 43 | LONG NumAdapters; 44 | IP_ADAPTER_INDEX_MAP Adapter[ANY_SIZE]; 45 | } IP_INTERFACE_INFO, *PIP_INTERFACE_INFO; 46 | 47 | /* 48 | * ipmib.h 49 | */ 50 | 51 | #define MIB_IPROUTE_TYPE_OTHER 1 52 | #define MIB_IPROUTE_TYPE_INVALID 2 53 | #define MIB_IPROUTE_TYPE_DIRECT 3 54 | #define MIB_IPROUTE_TYPE_INDIRECT 4 55 | 56 | DWORD WINAPI GetNetworkParams(PFIXED_INFO,PULONG); 57 | DWORD WINAPI GetIfEntry(PMIB_IFROW); 58 | DWORD WINAPI GetIpStatisticsEx(PMIB_IPSTATS,ULONG); 59 | -------------------------------------------------------------------------------- /include/win/wincon.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file wincon.h 3 | * Copyright 2012, 2013 MinGW.org project 4 | * 5 | * Permission is hereby granted, free of charge, to any person obtaining a 6 | * copy of this software and associated documentation files (the "Software"), 7 | * to deal in the Software without restriction, including without limitation 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 | * and/or sell copies of the Software, and to permit persons to whom the 10 | * Software is furnished to do so, subject to the following conditions: 11 | * 12 | * The above copyright notice and this permission notice (including the next 13 | * paragraph) shall be included in all copies or substantial portions of the 14 | * Software. 15 | * 16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 | * DEALINGS IN THE SOFTWARE. 23 | */ 24 | 25 | typedef struct _COORD { 26 | SHORT X; 27 | SHORT Y; 28 | } COORD, *PCOORD; 29 | 30 | typedef struct _SMALL_RECT { 31 | SHORT Left; 32 | SHORT Top; 33 | SHORT Right; 34 | SHORT Bottom; 35 | } SMALL_RECT; 36 | 37 | typedef struct _CONSOLE_SCREEN_BUFFER_INFO { 38 | COORD dwSize; 39 | COORD dwCursorPosition; 40 | WORD wAttributes; 41 | SMALL_RECT srWindow; 42 | COORD dwMaximumWindowSize; 43 | } CONSOLE_SCREEN_BUFFER_INFO; 44 | -------------------------------------------------------------------------------- /include/win/winternl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * https://www.nirsoft.net/kernel_struct/vista/NT_TIB.html 3 | */ 4 | 5 | typedef enum _EXCEPTION_DISPOSITION 6 | { 7 | ExceptionContinueExecution = 0, 8 | ExceptionContinueSearch = 1, 9 | ExceptionNestedException = 2, 10 | ExceptionCollidedUnwind = 3 11 | } EXCEPTION_DISPOSITION, *PEXCEPTION_DISPOSITION; 12 | 13 | typedef struct _EXCEPTION_REGISTRATION_RECORD 14 | { 15 | struct _EXCEPTION_REGISTRATION_RECORD *Next; 16 | PEXCEPTION_DISPOSITION Handler; 17 | } EXCEPTION_REGISTRATION_RECORD, *PEXCEPTION_REGISTRATION_RECORD; 18 | 19 | typedef struct _NT_TIB 20 | { 21 | PEXCEPTION_REGISTRATION_RECORD ExceptionList; 22 | PVOID StackBase; 23 | PVOID StackLimit; 24 | PVOID SubSystemTib; 25 | union 26 | { 27 | PVOID FiberData; 28 | ULONG Version; 29 | }; 30 | PVOID ArbitraryUserPointer; 31 | struct _NT_TIB *Self; 32 | } NT_TIB, *PNT_TIB; 33 | -------------------------------------------------------------------------------- /libposix/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.inc 2 | 3 | RELEASE=6.1.0 4 | 5 | LIBPOSIX=libposix-${RELEASE}.dll 6 | IMPLIB=libposix.dll.a 7 | CFLAGS+=-I../include -g 8 | CFLAGS+=-DRELEASE=\"${RELEASE}\" -DVERSION=\"${VERSION}\" -DBUILD=${BUILD} 9 | #CFLAGS+=-Wunused 10 | LDFLAGS+=-shared -s 11 | OBJECTS=crt1.o msvc.o win_posix.o vfs_posix.o libposix.o 12 | WINDIR=/C/WINDOWS/system32 13 | GCCDIR=../mingw/gcc 14 | TRACEDIR=../libtrace 15 | 16 | all: ${LIBPOSIX} 17 | 18 | crt1.o: crt1.c 19 | gcc -c ${CFLAGS} $< 20 | 21 | msvc.o: msvc.c 22 | gcc -c ${CFLAGS} -I${MINGW}/include -o $@ $< 23 | 24 | win_posix.o: win/win.c 25 | gcc -c ${CFLAGS} -I${MINGW}/include -o $@ $< 26 | 27 | vfs_posix.o: vfs/vfs.c 28 | gcc -c ${CFLAGS} -I${MINGW}/include -I${TRACEDIR} -o $@ $< 29 | 30 | libposix.o: libposix.c 31 | gcc -c ${CFLAGS} -I../openbsd/include -I../openbsd/sys \ 32 | -DTTYDEFCHARS -DKTRACE -DSYSVSEM $< 33 | 34 | version.o: version.rc 35 | windres -DVERSION=\\\"${VERSION}\\\" -DRELEASE=\\\"${RELEASE}\\\" $< $@ 36 | 37 | libposix.a: win_posix.o msvc_posix.o 38 | ar cru $@ $^ 39 | 40 | arch.d: 41 | @${MAKE} -C arch CFLAGS="-I../../openbsd/include -I../../include" 42 | 43 | ${LIBPOSIX}: arch.d ${OBJECTS} version.o 44 | ${LD} ${LDFLAGS} -e _DllMainCRTStartup@12 --out-implib=${IMPLIB} --disable-auto-import --enable-stdcall-fixup \ 45 | -o $@ --image-base=${IMGBASE_LIBPOSIX} ${OBJECTS} $(shell /bin/ls arch/*.o) version.o \ 46 | -L${WINDIR} -L${GCCDIR} -L${TRACEDIR} -lmsvcrt -ladvapi32 -lshell32 -luser32 -lntdll -lkernel32 \ 47 | -lnetapi32 -lws2_32 -liphlpapi -lrpcrt4 -lmpr -lgcc -ltrace 48 | 49 | clean: 50 | /bin/rm -f arch/*.o *.o *.a *.dll 51 | 52 | ${LIBDIR}: 53 | /bin/mkdir -p ${LIBDIR} 54 | 55 | ${BINDIR}: 56 | /bin/mkdir -p ${BINDIR} 57 | 58 | install-local: ${LIBDIR} ${BINDIR} 59 | /bin/cp ${LIBPOSIX} ${BINDIR}/ 60 | /bin/cp ${IMPLIB} ${LIBDIR}/libmingw32.a 61 | 62 | install: ${DESTDIR} 63 | ginstall -m 06555 ${LIBPOSIX} ${DESTDIR}${SBINDIR}/ 64 | 65 | -------------------------------------------------------------------------------- /libposix/arch/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=fork.o syscall.o 2 | 3 | all: ${OBJECTS} 4 | 5 | %.o: ${PROCESSOR_ARCHITECTURE}/%.S 6 | gcc -c ${CFLAGS} -o $@ $< 7 | 8 | -------------------------------------------------------------------------------- /libposix/sys/msg.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /************************************************************/ 34 | 35 | int 36 | sys_msgget(call_t call, key_t key, int flags) 37 | { 38 | WIN_ERR("sys_msgget(%d)\n", key); 39 | return(-EOPNOTSUPP); 40 | } 41 | int 42 | sys_msgsnd(call_t call, int msqid, const void *msgp, size_t msgsz, int flags) 43 | { 44 | WIN_ERR("sys_msgsnd(%d)\n", msqid); 45 | return(-EOPNOTSUPP); 46 | } 47 | -------------------------------------------------------------------------------- /libposix/sys/reboot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | int 36 | sys_reboot(call_t call, int howto) 37 | { 38 | int result = 0; 39 | 40 | if (!vfs_reboot(call.Task, B_TYPE(howto), B_UNIT(howto))){ 41 | result -= errno_posix(GetLastError()); 42 | }else{ 43 | __exit(call.Task, 0); 44 | } 45 | return(result); 46 | } 47 | -------------------------------------------------------------------------------- /libposix/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/libposix/version.rc -------------------------------------------------------------------------------- /libposix/vfs/char/char.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "char_syscall.c" 32 | #include "char_interix.c" 33 | #include "char_vt100.c" 34 | #include "char_ansi.c" 35 | #include "char_null.c" 36 | #include "char_input.c" 37 | #include "char_screen.c" 38 | #include "char_console.c" 39 | #include "char_fcntl.c" 40 | #include "char_unistd.c" 41 | #include "char_namei.c" 42 | #include "char_poll.c" 43 | #include "char_termio.c" 44 | #include "char_filio.c" 45 | -------------------------------------------------------------------------------- /libposix/vfs/disk/directory/directory.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "directory_fcntl.c" 32 | #include "directory_stat.c" 33 | #include "directory_unistd.c" 34 | -------------------------------------------------------------------------------- /libposix/vfs/disk/disk.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | BOOL disk_lookup(WIN_NAMEIDATA *Path, DWORD Flags); 32 | 33 | #include "disk_syscall.c" 34 | #include "disk_sysctl.c" 35 | #include "disk_dirent.c" 36 | #include "link/link.c" 37 | #include "file/file.c" 38 | #include "directory/directory.c" 39 | #include "disk_fcntl.c" 40 | #include "disk_namei.c" 41 | #include "disk_unistd.c" 42 | #include "disk_stat.c" 43 | #include "disk_time.c" 44 | #include "disk_poll.c" 45 | -------------------------------------------------------------------------------- /libposix/vfs/disk/disk_poll.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | BOOL 36 | disk_poll(HANDLE Handle, WIN_POLLFD *Info, DWORD *Result) 37 | { 38 | BOOL bResult = TRUE; 39 | SHORT sResult = WIN_POLLIN; 40 | 41 | if (Info->Result = sResult & Info->Events){ 42 | *Result += 1; 43 | } 44 | return(bResult); 45 | } 46 | -------------------------------------------------------------------------------- /libposix/vfs/disk/file/file.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "file_fcntl.c" 32 | #include "file_stat.c" 33 | #include "file_unistd.c" 34 | -------------------------------------------------------------------------------- /libposix/vfs/disk/link/link.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "link_stat.c" 32 | #include "link_unistd.c" 33 | -------------------------------------------------------------------------------- /libposix/vfs/disk/link/link_stat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | BOOL 36 | link_stat(WIN_NAMEIDATA *Path, WIN_VATTR *Result) 37 | { 38 | BOOL bResult = FALSE; 39 | 40 | if (VfsStatHandle(Path->Object, Result)){ 41 | Result->DeviceId = __Mounts[Path->MountId].DeviceId; 42 | Result->Mode.FileType = Path->FileType; 43 | bResult = CloseHandle(Path->Object); 44 | } 45 | return(bResult); 46 | } 47 | -------------------------------------------------------------------------------- /libposix/vfs/drive/drive.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "drive_namei.c" 32 | #include "drive_device.c" 33 | #include "drive_mount.c" 34 | #include "drive_statvfs.c" 35 | -------------------------------------------------------------------------------- /libposix/vfs/mailslot/mailslot.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "mailslot_syscall.c" 32 | #include "mailslot_fcntl.c" 33 | #include "mailslot_stat.c" 34 | #include "mailslot_poll.c" 35 | #include "mailslot_unistd.c" 36 | -------------------------------------------------------------------------------- /libposix/vfs/pdo/pdo_dkio.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | BOOL 36 | pdo_DIOCGDINFO(WIN_DEVICE *Device) 37 | { 38 | vfs_ktrace(L"pdo_DIOCGDINFO", STRUCT_DEVICE, Device); 39 | return(FALSE); 40 | } 41 | -------------------------------------------------------------------------------- /libposix/vfs/pdo/pdo_ptm.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | BOOL 36 | ptm_open(WIN_DEVICE *Device, WIN_FLAGS *Flags, WIN_VNODE *Result) 37 | { 38 | Result->DeviceType = Device->DeviceType; 39 | Result->DeviceId = Device->DeviceId; 40 | Result->Index = Device->Index; 41 | return(TRUE); 42 | } 43 | -------------------------------------------------------------------------------- /libposix/vfs/pipe/fifo/fifo.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "fifo_unistd.c" 32 | #include "fifo_poll.c" 33 | -------------------------------------------------------------------------------- /libposix/vfs/pipe/pipe.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "pipe_syscall.c" 32 | #include "pipe_filio.c" 33 | #include "fifo/fifo.c" 34 | #include "socket/socket.c" 35 | #include "pipe_namei.c" 36 | #include "pipe_poll.c" 37 | #include "pipe_unistd.c" 38 | #include "pipe_fcntl.c" 39 | #include "pipe_stat.c" 40 | #include "pipe_socket.c" 41 | -------------------------------------------------------------------------------- /libposix/vfs/pipe/socket/socket.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "socket_poll.c" 32 | #include "socket_select.c" 33 | #include "socket_unistd.c" 34 | -------------------------------------------------------------------------------- /libposix/vfs/process/process.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "process_sched.c" 32 | #include "process_syscall.c" 33 | #include "process_stdlib.c" 34 | #include "process_unistd.c" 35 | #include "process_poll.c" 36 | -------------------------------------------------------------------------------- /libposix/vfs/registry/registry.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "registry_namei.c" 32 | #include "registry_fcntl.c" 33 | #include "registry_unistd.c" 34 | #include "registry_termio.c" 35 | -------------------------------------------------------------------------------- /libposix/vfs/shell/shell.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "shell_unistd.c" 32 | #include "shell_namei.c" 33 | #include "shell_stat.c" 34 | -------------------------------------------------------------------------------- /libposix/vfs/shell/shell_stat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | BOOL 36 | shell_stat(WIN_NAMEIDATA *Path, WIN_VATTR *Result) 37 | { 38 | BOOL bResult = FALSE; 39 | 40 | if (VfsStatFile(Path->Resolved, FILE_ATTRIBUTE_NORMAL, Result)){ 41 | Result->DeviceId = __Mounts[Path->MountId].DeviceId; 42 | Result->Mode.FileType = Path->FileType; 43 | bResult = TRUE; 44 | } 45 | return(bResult); 46 | } 47 | -------------------------------------------------------------------------------- /libposix/vfs/vfs_systm.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /****************************************************/ 34 | 35 | VOID 36 | consinit(VOID) 37 | { 38 | WORD wAttribs = BACKGROUND_BLUE | FOREGROUND_WHITE | FOREGROUND_INTENSITY; 39 | 40 | /* sys/arch/i386/i386/machdep.c 41 | */ 42 | SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), wAttribs); 43 | } 44 | -------------------------------------------------------------------------------- /libposix/vfs/volume/volume.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "volume_stat.c" 32 | -------------------------------------------------------------------------------- /libposix/win/win_signal.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | /************************************************************/ 34 | 35 | BOOL 36 | win_kill(DWORD ThreadId, UINT Message, WPARAM WParam, LPARAM LParam) 37 | { 38 | return(PostThreadMessage(ThreadId, Message, WParam, LParam)); 39 | } 40 | -------------------------------------------------------------------------------- /libtrace/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.inc 2 | 3 | all: libtrace.a 4 | 5 | %.d: % 6 | @${MAKE} -C $< 7 | 8 | libtrace.a: win.d vfs.d 9 | ar cru $@ $(shell /bin/ls -f win/*.o vfs/*.o) 10 | 11 | clean: 12 | ${MAKE} -C win clean 13 | ${MAKE} -C vfs clean 14 | -------------------------------------------------------------------------------- /libtrace/vfs/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.inc 2 | 3 | OBJECTS = VfsFileAttribs.o VfsFileFlags.o VfsPathFlags.o VfsVolumeFlags.o \ 4 | VfsTaskFlags.o VfsInputMode.o VfsNetEvents.o VfsScreenMode.o 5 | OBJECTS += vfs_CAP_CONTROL.o vfs_VNODE.o vfs_NAMEI.o vfs_DEVICE.o vfs_MOUNT.o \ 6 | vfs_STATFS.o vfs_INODE.o vfs_TASK.o vfs_THREAD.o vfs_TTY.o vfs_CONIN.o \ 7 | vfs_ACCESS.o vfs_NETFLAGS.o vfs_CFDATA.o 8 | 9 | CFLAGS += -DWIN_ERR=printf 10 | 11 | all: ${OBJECTS} 12 | 13 | %.o: %.c 14 | gcc -c ${CFLAGS} -I${MINGW}/include -I../../include -I.. -o $@ $< 15 | 16 | clean: 17 | rm -f *.o ${LIB} 18 | -------------------------------------------------------------------------------- /libtrace/vfs/VfsFileFlags.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | LPSTR 34 | VfsFileFlags(LPSTR Buffer, DWORD Flags) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, " Flags([0x%x]", Flags); 39 | psz = WinFlagName(psz, HANDLE_FLAG_INHERIT, "INHERIT", Flags, &Flags); 40 | psz = WinFlagName(psz, HANDLE_FLAG_PROTECT_FROM_CLOSE, "PROTECT_FROM_CLOSE", Flags, &Flags); 41 | psz += sprintf(psz, "[0x%x])\n", Flags); 42 | return(psz); 43 | } 44 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_ACCESS.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_ACCESS(ACCESS_MASK Access, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, "(0x%x):\n", Access); 39 | psz = WinFileAccess(psz, Access, OB_TYPE_FILE); 40 | return(psz - Buffer); 41 | } 42 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_CFDATA.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_CFDATA(WIN_CFDATA *Config, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, "(%ls): Bus(%ls) FSType(%s), DosPath(%ls) Depth(%d) Class(%ls)\n", 39 | Config->NtName, Config->BusName, __FSTYPE[Config->FSType], Config->DosPath, Config->Depth, Config->ClassName); 40 | psz += sprintf(psz, "+ NtPath: %ls\n", Config->NtPath); 41 | return(psz - Buffer); 42 | } 43 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_CONIN.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_CONIN(DWORD Mode, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, ":\n"); 39 | psz = VfsInputMode(psz, "+ mode", Mode); 40 | return(psz - Buffer); 41 | } 42 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_INODE.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_INODE(WIN_INODE *Node, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, "(%s:%s): DeviceId(0x%x) NameSize(%d) Reserved1(%d) Reserved2(%d)\n", 39 | __FSTYPE[Node->FSType], __FTYPE[Node->FileType], Node->DeviceId, Node->NameSize, Node->Reserved1, Node->Reserved2); 40 | return(psz - Buffer); 41 | } 42 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_NETFLAGS.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_NETFLAGS(LONG Events, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz = VfsNetEvents(psz, Events); 39 | return(psz - Buffer); 40 | } 41 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_STATFS.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_STATFS(WIN_STATFS *Info, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, "(%ls): DevId(0x%x) MaxPath(%d) ClustersTotal(%d) FreeClusters(%d)\n", 39 | Info->TypeName, Info->DeviceId, Info->MaxPath, Info->ClustersTotal, Info->FreeClusters); 40 | psz = VfsVolumeFlags(psz, "+ Flags", Info->Flags); 41 | psz += sprintf(psz, "+ Path: %ls\n", Info->Path); 42 | return(psz - Buffer); 43 | } 44 | -------------------------------------------------------------------------------- /libtrace/vfs/vfs_THREAD.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | DWORD 34 | vfs_THREAD(WIN_THREAD_STRUCT *Thread, LPSTR Buffer) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | psz += sprintf(psz, "(%d): return(0x%lx) origin(0x%lx) size(0x%lx) source(0x%lx) dest(0x%lx) offset(0x%lx) Flags(0x%x)\n", 39 | Thread->Result, Thread->raddr, Thread->origin, Thread->size, Thread->source, Thread->dest, Thread->offset, Thread->Flags); 40 | return(psz - Buffer); 41 | } 42 | -------------------------------------------------------------------------------- /libtrace/win/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.inc 2 | 3 | OBJECTS = WinFlagName.o WinAceFlags.o WinFileAccess.o WinSecurityFlags.o \ 4 | WinGroupAttribs.o WinPrivilegeAttribs.o 5 | OBJECTS += win_ACL.o win_SID.o win_TOKEN.o win_SECURITY_DESCRIPTOR.o \ 6 | win_TOKEN_PRIVILEGES.o win_TOKEN_GROUPS.o win_SID_RIGHTS.o win_SYSTEM_INFO.o 7 | 8 | CFLAGS += -DWIN_ERR=printf 9 | 10 | all: ${OBJECTS} 11 | 12 | %.o: %.c 13 | gcc -c ${CFLAGS} -I${MINGW}/include -I../../include -I.. -o $@ $< 14 | 15 | clean: 16 | rm -f *.o 17 | -------------------------------------------------------------------------------- /libtrace/win/WinFlagName.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "config.h" 32 | 33 | LPSTR 34 | WinFlagName(LPSTR Buffer, DWORD Flag, LPCSTR Name, DWORD Mask, DWORD *Remain) 35 | { 36 | LPSTR psz = Buffer; 37 | 38 | if (Mask & Flag){ 39 | *Remain &= ~Flag; 40 | psz += sprintf(psz, "[%s]", Name); 41 | CharLower(Buffer); 42 | } 43 | return(psz); 44 | } 45 | -------------------------------------------------------------------------------- /mingw/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.inc 2 | 3 | UBINDIR=${PREFIX}/bin 4 | LIBEXEC=${PREFIX}/libexec 5 | 6 | LIBS=libadvapi32.a libkernel32.a libshell32.a libuser32.a \ 7 | libmoldname.a libgmon.a 8 | 9 | all: ${LIBS} 10 | @${MAKE} -C bin 11 | @${MAKE} -C gcc 12 | 13 | # 14 | # below -k option makes ld remove "@" suffix 15 | # 16 | 17 | %.a: %.def 18 | dlltool -d $< -l $@ -k 19 | 20 | %.exe: ${MINGW}/bin/%.exe 21 | /bin/cp -vu $< ${UBINDIR}/ 22 | 23 | %.dll: ${MINGW}/bin/%.dll 24 | /bin/cp -vu $< ${BINDIR}/ 25 | 26 | bin.d: 27 | @${MAKE} -C bin 28 | 29 | includes-local: 30 | @/bin/cp -rvu include/* ${INCDIR}/ 31 | 32 | ${BINDIR}: 33 | mkdir -p ${BINDIR} 34 | 35 | ${UBINDIR}: 36 | mkdir -p ${UBINDIR} 37 | 38 | ${LIBDIR}: 39 | mkdir -p ${LIBDIR} 40 | 41 | ${LIBEXEC}: 42 | mkdir -p ${LIBEXEC} 43 | 44 | GCCBIN=gcc.exe cc.exe cpp.exe 45 | GCCLIB=libgmp-10.dll libmpc-3.dll libmpfr-4.dll zlib1.dll libgcc_s_dw2-1.dll 46 | GCCBIN+=g++.exe c++.exe gdb.exe 47 | GCCLIB+=libintl-8.dll libiconv-2.dll libstdc++-6.dll 48 | 49 | #cp /c/MinGW/mingw32/lib/gcc/mingw32/4.8.1/libstdc++.dll.a /lib/gcc/mingw32/4.8.1/libstdc++.a 50 | 51 | BINUTILS=ld.exe ar.exe as.exe nm.exe objdump.exe ranlib.exe size.exe strip.exe \ 52 | dlltool.exe gprof.exe addr2line.exe dllwrap.exe elfedit.exe objcopy.exe \ 53 | strings.exe windmc.exe windres.exe c++filt.exe 54 | 55 | MSGBIN=msgfmt.exe libgettextsrc-0-18-3.dll libgettextlib-0-18-3.dll 56 | 57 | install-gcc: ${BINDIR} ${UBINDIR} ${GCCBIN} ${GCCLIB} 58 | install-ld: ${UBINDIR} ${BINUTILS} 59 | 60 | # create dummy ld.so for configure scripts to detect shared libs 61 | 62 | install-lib: ${LIBDIR} 63 | /bin/cp ${LIBS} ${LIBDIR}/ 64 | 65 | install-libexec: ${LIBEXEC} 66 | /bin/cp -rvu ${MINGW}/libexec/gcc ${LIBEXEC}/ 67 | 68 | install-tools: ${MSGBIN} 69 | 70 | install-local: install-lib 71 | @${MAKE} -C gcc install-local 72 | 73 | install: 74 | @${MAKE} -C gcc install 75 | @${MAKE} -C bin install 76 | 77 | clean: 78 | /bin/rm -f *.a 79 | @${MAKE} -C gcc clean 80 | 81 | -------------------------------------------------------------------------------- /mingw/bin/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.inc 2 | 3 | OBJECTS=chmod.exe chgrp.exe cp.exe ln.exe ls.exe \ 4 | mkdir.exe mv.exe rm.exe rmdir.exe touch.exe uname.exe chown.exe \ 5 | ginstall.exe mknod.exe test.exe scacls.exe 6 | #OBJECTS+=cat.exe 7 | COREDIR=/D/src/coreutils-8.13/src 8 | CFLAGS+=-s 9 | 10 | # cat.exe: standard output: Bad file descriptor 11 | 12 | all: ${OBJECTS} 13 | 14 | %.exe: ${COREDIR}/%.exe 15 | /bin/install -s $< $@ 16 | 17 | scacls.exe: scacls.c 18 | gcc ${CFLAGS} -I../../include -o $@ $< 19 | 20 | install: 21 | ginstall ginstall.exe ${DESTDIR}/usr/bin/ginstall 22 | -------------------------------------------------------------------------------- /mingw/gcc/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.inc 2 | 3 | CRT0=crt0.o 4 | OBJECTS=${CRT0} crt1.o crtbegin.o crtend.o gcrt0.o 5 | LIBS=libgcc.a libgcc_s.a libgcc_eh.a 6 | GCCOBJ=_mulsc3.o _muldc3.o _mulxc3.o _ctzdi2.o \ 7 | _ffsdi2.o _popcountdi2.o _popcountsi2.o _popcount_tab.o _udivdi3.o \ 8 | _divdi3.o _clrsbdi2.o _clrsbsi2.o \ 9 | _chkstk.o _chkstk_ms.o 10 | GCCINC=/lib/gcc/mingw32/${GCCVER}/include 11 | 12 | all: ${OBJECTS} ${LIBS} 13 | 14 | %.o: %.c 15 | gcc -c ${CFLAGS} -I../../openbsd/include -I../../include -o $@ $< 16 | 17 | # 18 | # we need alloca(), which belongs in libgcc.a 19 | # btw: there is a chkstk() in ntdll.dll 20 | # 21 | 22 | libgcc.a: wintls.o emutls.o mempcpy.o gnu_mntent.o futimesat.o 23 | ar xv ${MINGW}/lib/gcc/mingw32/${GCCVER}/libgcc.a ${GCCOBJ} 24 | ar cru $@ ${GCCOBJ} $^ 25 | # wintls.o 26 | 27 | libgcc_s.a: libgcc_s.def 28 | dlltool -d $< -l $@ -k 29 | 30 | libgcc_eh.a: libgcc_eh.def 31 | dlltool -d $< -l $@ -k 32 | 33 | #libgcc_eh.a: emutls.o wintls.o mempcpy.o gnu_mntent.o futimesat.o 34 | # ar cru $@ $^ 35 | 36 | # combine objects: 37 | 38 | crt0_tls.o: crt0.o win_tls.o 39 | ld -r -o $@ crt0.o win_tls.o 40 | 41 | includes-local: ${CPPINC} 42 | /bin/cp -rvu ${MINGW}${CPPINC}/c++ ${GCCINC}/ 43 | /bin/cp -rvu ${MINGW}${CPPINC}/ssp ${GCCINC}/ 44 | 45 | install-local: ${LIBDIR}/gcc/mingw32/${GCCVER} 46 | /bin/cp ${MINGW}/lib/gcc/mingw32/${GCCVER}/libstdc++.dll.a ${LIBDIR}/gcc/mingw32/${GCCVER}/libstdc++.a 47 | /bin/cp ${LIBS} ${LIBDIR}/gcc/mingw32/${GCCVER}/ 48 | /bin/cp crtbegin.o crtend.o ${LIBDIR}/gcc/mingw32/${GCCVER}/ 49 | /bin/cp ${CRT0} ${LIBDIR}/crt2.o 50 | /bin/cp crt1.o ${LIBDIR}/dllcrt2.o 51 | /bin/cp gcrt0.o ${LIBDIR}/gcrt2.o 52 | 53 | install: ${DESTDIR}${LIBDIR} 54 | cp libgcc.a ${DESTDIR}${LIBDIR}/gcc/i686-pe-openbsd/${GCCVER}/ 55 | cp crtbegin.o crtend.o ${DESTDIR}${LIBDIR}/ 56 | cp ${CRT0} ${DESTDIR}${LIBDIR}/ 57 | cp crt1.o ${DESTDIR}${LIBDIR}/ 58 | cp gcrt0.o ${DESTDIR}${LIBDIR}/ 59 | 60 | clean: 61 | /bin/rm -f *.o *.a 62 | -------------------------------------------------------------------------------- /mingw/gcc/crt1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holder nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "win/windows.h" /* minimal Win32 */ 32 | #include "win_types.h" 33 | 34 | /****************************************************/ 35 | 36 | BOOL WINAPI 37 | DllMainCRTStartup(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 38 | { 39 | return(TRUE); 40 | } 41 | -------------------------------------------------------------------------------- /mingw/gcc/crtend.c: -------------------------------------------------------------------------------- 1 | /* $Id: crtend.c,v 1.3 2003/11/06 17:12:50 pefo Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2001-2002 Opsycon AB (www.opsycon.se / www.opsycon.com) 5 | * 6 | * Redistribution and use in source and binary forms, with or without 7 | * modification, are permitted provided that the following conditions 8 | * are met: 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 2. Redistributions in binary form must reproduce the above copyright 12 | * notice, this list of conditions and the following disclaimer in the 13 | * documentation and/or other materials provided with the distribution. 14 | * 3. All advertising materials mentioning features or use of this software 15 | * must display the following acknowledgement: 16 | * This product includes software developed by Opsycon AB, Sweden. 17 | * 4. The name of the author may not be used to endorse or promote products 18 | * derived from this software without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 21 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 24 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | * 32 | */ 33 | #include 34 | 35 | typedef void (*func_ptr) (void); 36 | 37 | #define NULL 0 38 | 39 | static func_ptr __CTOR_END__[1] __attribute__ ((section (".ctors"))) = { 40 | (func_ptr)(NULL) 41 | }; 42 | static func_ptr __DTOR_END__[1] __attribute__ ((section (".dtors"))) = { 43 | (func_ptr)(NULL) 44 | }; 45 | 46 | -------------------------------------------------------------------------------- /mingw/gcc/futimesat.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | #include 33 | 34 | int 35 | futimesat(int dirfd, const char *path, const struct timeval times[2]) 36 | { 37 | struct timespec spec[2]; 38 | 39 | spec[0].tv_sec = times[0].tv_sec; 40 | spec[0].tv_nsec = times[0].tv_usec * 1000; 41 | spec[1].tv_sec = times[1].tv_sec; 42 | spec[1].tv_nsec = times[1].tv_usec * 1000; 43 | return(utimensat(dirfd, path, spec, 0)); 44 | } 45 | -------------------------------------------------------------------------------- /mingw/gcc/gcrt0.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holder nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | #include 33 | 34 | #include 35 | 36 | extern unsigned char etext, eprol; 37 | 38 | void monstartup(u_long lowpc, u_long highpc); 39 | void _mcleanup(void); 40 | 41 | /****************************************************/ 42 | 43 | void 44 | _monstartup(void) 45 | { 46 | atexit(_mcleanup); 47 | monstartup((u_long)&eprol, (u_long)&etext); 48 | } 49 | 50 | __asm(" .text\n_eprol:"); 51 | 52 | -------------------------------------------------------------------------------- /mingw/gcc/libgcc_eh.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | ___libgcc_eh_dummy DATA 3 | -------------------------------------------------------------------------------- /mingw/gcc/libgcc_s.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | ___libgcc_s_dummy DATA 3 | -------------------------------------------------------------------------------- /mingw/gcc/libgcc_s_dw2-1.def: -------------------------------------------------------------------------------- 1 | LIBRARY kernel32.dll 2 | EXPORTS 3 | ___gcc_s_dw2_1_dummy DATA 4 | -------------------------------------------------------------------------------- /mingw/gcc/mempcpy.c: -------------------------------------------------------------------------------- 1 | /* Copy memory to memory until the specified number of bytes 2 | has been copied, return pointer to following byte. 3 | Overlap is NOT handled correctly. 4 | Copyright (C) 1991-2018 Free Software Foundation, Inc. 5 | This file is part of the GNU C Library. 6 | Contributed by Torbjorn Granlund (tege@sics.se). 7 | The GNU C Library is free software; you can redistribute it and/or 8 | modify it under the terms of the GNU Lesser General Public 9 | License as published by the Free Software Foundation; either 10 | version 2.1 of the License, or (at your option) any later version. 11 | The GNU C Library is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | Lesser General Public License for more details. 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with the GNU C Library; if not, see 17 | . */ 18 | 19 | /* Needed for GNU gcc.exe */ 20 | 21 | #include 22 | 23 | /************************************************************/ 24 | 25 | void * 26 | mempcpy(void *dest, const void *src, size_t n) 27 | { 28 | char *result = dest; 29 | 30 | while (n-- > 0){ 31 | *result++ = *(char *)src++; 32 | } 33 | return(result); 34 | } 35 | -------------------------------------------------------------------------------- /mingw/libadvapi32.def: -------------------------------------------------------------------------------- 1 | LIBRARY advapi32.dll 2 | EXPORTS 3 | CreateWellKnownSid@16 4 | -------------------------------------------------------------------------------- /mingw/libgmon.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | ___gmon_dummy DATA 3 | -------------------------------------------------------------------------------- /mingw/libkernel32.def: -------------------------------------------------------------------------------- 1 | LIBRARY kernel32.dll 2 | EXPORTS 3 | VirtualProtect@16 4 | -------------------------------------------------------------------------------- /mingw/libmoldname.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | ___moldname_dummy DATA 3 | -------------------------------------------------------------------------------- /mingw/libshell32.def: -------------------------------------------------------------------------------- 1 | LIBRARY shell32.dll 2 | EXPORTS 3 | ___shell32_dummy DATA 4 | -------------------------------------------------------------------------------- /mingw/libuser32.def: -------------------------------------------------------------------------------- 1 | LIBRARY user32.dll 2 | EXPORTS 3 | ___user32_dummy DATA 4 | -------------------------------------------------------------------------------- /mount.sh.sample: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MSYS=C:/MinGW/msys/1.0 4 | FSTAB=$MSYS/etc/fstab 5 | 6 | if [[ "$1" == minc ]]; then 7 | echo "D:/libminc-0.6.1/mingw/bin /usr/local/bin" >$FSTAB 8 | echo "C:/MinC/usr/lib /mingw/bin" >>$FSTAB 9 | elif [[ "$1" == mingw ]]; then 10 | echo "C:/MinGW /mingw" >$FSTAB 11 | else 12 | /bin/cat $FSTAB 13 | fi 14 | -------------------------------------------------------------------------------- /openbsd/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.inc 2 | 3 | all: 4 | @${MAKE} -C lib 5 | @${MAKE} -C usr.bin 6 | 7 | includes-local: ${INCDIR}/machine 8 | @/bin/cp -rvu include/* ${INCDIR}/ 9 | @/bin/cp -rvu sys/sys ${INCDIR}/ 10 | @/bin/cp -rvu sys/dev ${INCDIR}/ 11 | @/bin/cp -rvu sys/net ${INCDIR}/ 12 | @/bin/cp -rvu sys/nfs ${INCDIR}/ 13 | @/bin/cp -rvu sys/uvm ${INCDIR}/ 14 | @/bin/cp -rvu sys/netmpls ${INCDIR}/ 15 | @/bin/cp -rvu sys/netinet ${INCDIR}/ 16 | @/bin/cp -rvu sys/netinet6 ${INCDIR}/ 17 | @/bin/cp -rvu sys/net80211 ${INCDIR}/ 18 | @/bin/cp -rvu sys/arch/i386/include/* ${INCDIR}/machine/ 19 | @${MAKE} -C lib includes-local 20 | 21 | includes: ${DESTDIR} 22 | @cp -rvu include/* ${DESTDIR}${INCDIR}/ 23 | @cp -rvu sys/sys ${DESTDIR}${INCDIR}/ 24 | @cp -rvu sys/arch/i386/include/* ${DESTDIR}${INCDIR}/machine/ 25 | 26 | install: ${DESTDIR} 27 | @cp -rvu share/mk ${DESTDIR}${SHDIR}/ 28 | @${MAKE} -C lib install 29 | 30 | install-local: 31 | @${MAKE} -C lib install-local 32 | @${MAKE} -C usr.bin install-local 33 | 34 | clean: 35 | @${MAKE} -C lib clean 36 | @${MAKE} -C usr.bin clean 37 | -------------------------------------------------------------------------------- /openbsd/include/a.out.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/a.out.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ 2 | /* $NetBSD: a.out.h,v 1.15 1994/10/26 00:55:42 cgd Exp $ */ 3 | 4 | /*- 5 | * Copyright (c) 1993 Theo de Raadt 6 | * Copyright (c) 1991 The Regents of the University of California. 7 | * All rights reserved. 8 | * 9 | * Redistribution and use in source and binary forms, with or without 10 | * modification, are permitted provided that the following conditions 11 | * are met: 12 | * 1. Redistributions of source code must retain the above copyright 13 | * notice, this list of conditions and the following disclaimer. 14 | * 2. Redistributions in binary form must reproduce the above copyright 15 | * notice, this list of conditions and the following disclaimer in the 16 | * documentation and/or other materials provided with the distribution. 17 | * 3. Neither the name of the University nor the names of its contributors 18 | * may be used to endorse or promote products derived from this software 19 | * without specific prior written permission. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 | * SUCH DAMAGE. 32 | * 33 | * @(#)a.out.h 5.6 (Berkeley) 4/30/91 34 | */ 35 | 36 | #ifndef _AOUT_H_ 37 | #define _AOUT_H_ 38 | 39 | #include 40 | 41 | #define _AOUT_INCLUDE_ 42 | #include 43 | 44 | #endif /* !_AOUT_H_ */ 45 | -------------------------------------------------------------------------------- /openbsd/include/dbm.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/dbm.h,v 1.6 2003/06/17 21:56:23 millert Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1999 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef _DBM_H_ 20 | #define _DBM_H_ 21 | 22 | #include 23 | 24 | __BEGIN_DECLS 25 | int dbmclose(void); 26 | int dbminit(const char *); 27 | int delete(datum); 28 | datum fetch(datum); 29 | datum firstkey(void); 30 | datum nextkey(datum); 31 | int store(datum, datum); 32 | __END_DECLS 33 | 34 | #endif /* _DBM_H_ */ 35 | -------------------------------------------------------------------------------- /openbsd/include/ieeefp.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/ieeefp.h,v 1.4 2009/09/27 21:23:55 martynas Exp $ */ 2 | 3 | /* 4 | * Written by J.T. Conklin, Apr 6, 1995 5 | * Public domain. 6 | */ 7 | 8 | #ifndef _IEEEFP_H_ 9 | #define _IEEEFP_H_ 10 | 11 | #include 12 | #include 13 | 14 | __BEGIN_DECLS 15 | extern fp_rnd fpgetround(void); 16 | extern fp_rnd fpsetround(fp_rnd); 17 | extern fp_except fpgetmask(void); 18 | extern fp_except fpsetmask(fp_except); 19 | extern fp_except fpgetsticky(void); 20 | extern fp_except fpsetsticky(fp_except); 21 | __END_DECLS 22 | 23 | #endif /* _IEEEFP_H_ */ 24 | -------------------------------------------------------------------------------- /openbsd/include/ifaddrs.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/ifaddrs.h,v 1.4 2004/01/22 21:48:02 espie Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1995, 1999 5 | * Berkeley Software Design, Inc. All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 13 | * THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND 14 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 16 | * ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE 17 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 | * SUCH DAMAGE. 24 | * 25 | * BSDI ifaddrs.h,v 2.5 2000/02/23 14:51:59 dab Exp 26 | */ 27 | 28 | #ifndef _IFADDRS_H_ 29 | #define _IFADDRS_H_ 30 | 31 | struct ifaddrs { 32 | struct ifaddrs *ifa_next; 33 | char *ifa_name; 34 | unsigned int ifa_flags; 35 | struct sockaddr *ifa_addr; 36 | struct sockaddr *ifa_netmask; 37 | struct sockaddr *ifa_dstaddr; 38 | void *ifa_data; 39 | }; 40 | 41 | /* 42 | * This may have been defined in . Note that if is 43 | * to be included it must be included before this header file. 44 | */ 45 | #ifndef ifa_broadaddr 46 | #define ifa_broadaddr ifa_dstaddr /* broadcast address interface */ 47 | #endif 48 | 49 | #include 50 | 51 | __BEGIN_DECLS 52 | extern int getifaddrs(struct ifaddrs **); 53 | extern void freeifaddrs(struct ifaddrs *); 54 | __END_DECLS 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /openbsd/include/libgen.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/libgen.h,v 1.7 2003/06/17 21:56:23 millert Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1997 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef _LIBGEN_H_ 20 | #define _LIBGEN_H_ 21 | 22 | #include 23 | 24 | __BEGIN_DECLS 25 | 26 | char *basename(const char *); 27 | char *dirname(const char *); 28 | #if 0 29 | char *regcmp(const char *, ...); 30 | char *regex(const char *, const char *, ...); 31 | 32 | extern char *__loc1; 33 | #endif 34 | 35 | __END_DECLS 36 | 37 | #endif /* _LIBGEN_H_ */ 38 | -------------------------------------------------------------------------------- /openbsd/include/malloc.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/malloc.h,v 1.2 1996/10/12 03:13:56 tholo Exp $ */ 2 | /* $NetBSD: malloc.h,v 1.3 1994/10/26 00:56:03 cgd Exp $ */ 3 | 4 | #warning " is obsolete, use " 5 | 6 | #include 7 | -------------------------------------------------------------------------------- /openbsd/include/md5.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/md5.h,v 1.17 2012/12/05 23:19:57 deraadt Exp $ */ 2 | 3 | /* 4 | * This code implements the MD5 message-digest algorithm. 5 | * The algorithm is due to Ron Rivest. This code was 6 | * written by Colin Plumb in 1993, no copyright is claimed. 7 | * This code is in the public domain; do with it what you wish. 8 | * 9 | * Equivalent code is available from RSA Data Security, Inc. 10 | * This code has been tested against that, and is equivalent, 11 | * except that you don't need to include two pages of legalese 12 | * with every copy. 13 | */ 14 | 15 | #ifndef _MD5_H_ 16 | #define _MD5_H_ 17 | 18 | #define MD5_BLOCK_LENGTH 64 19 | #define MD5_DIGEST_LENGTH 16 20 | #define MD5_DIGEST_STRING_LENGTH (MD5_DIGEST_LENGTH * 2 + 1) 21 | 22 | typedef struct MD5Context { 23 | u_int32_t state[4]; /* state */ 24 | u_int64_t count; /* number of bits, mod 2^64 */ 25 | u_int8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */ 26 | } MD5_CTX; 27 | 28 | __BEGIN_DECLS 29 | void MD5Init(MD5_CTX *); 30 | void MD5Update(MD5_CTX *, const u_int8_t *, size_t) 31 | __attribute__((__bounded__(__string__,2,3))); 32 | void MD5Pad(MD5_CTX *); 33 | void MD5Final(u_int8_t [MD5_DIGEST_LENGTH], MD5_CTX *) 34 | __attribute__((__bounded__(__minbytes__,1,MD5_DIGEST_LENGTH))); 35 | void MD5Transform(u_int32_t [4], const u_int8_t [MD5_BLOCK_LENGTH]) 36 | __attribute__((__bounded__(__minbytes__,1,4))) 37 | __attribute__((__bounded__(__minbytes__,2,MD5_BLOCK_LENGTH))); 38 | char *MD5End(MD5_CTX *, char *) 39 | __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH))); 40 | char *MD5File(const char *, char *) 41 | __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH))); 42 | char *MD5FileChunk(const char *, char *, off_t, off_t) 43 | __attribute__((__bounded__(__minbytes__,2,MD5_DIGEST_STRING_LENGTH))); 44 | char *MD5Data(const u_int8_t *, size_t, char *) 45 | __attribute__((__bounded__(__string__,1,2))) 46 | __attribute__((__bounded__(__minbytes__,3,MD5_DIGEST_STRING_LENGTH))); 47 | __END_DECLS 48 | 49 | #endif /* _MD5_H_ */ 50 | -------------------------------------------------------------------------------- /openbsd/include/memory.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/memory.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ 2 | /* $NetBSD: memory.h,v 1.3 1994/10/26 00:56:06 cgd Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 1988 Regents of the University of California. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. Neither the name of the University nor the names of its contributors 17 | * may be used to endorse or promote products derived from this software 18 | * without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | * 32 | * @(#)memory.h 5.5 (Berkeley) 6/1/90 33 | */ 34 | 35 | #include 36 | -------------------------------------------------------------------------------- /openbsd/include/poll.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/poll.h,v 1.3 2003/10/29 16:41:13 deraadt Exp $ */ 2 | 3 | /* 4 | * Written by Theo de Raadt, Public Domain 5 | * 6 | * Typical poll() implementations expect poll.h to be in /usr/include. 7 | * However this is not a convenient place for the real definitions. 8 | */ 9 | #include 10 | -------------------------------------------------------------------------------- /openbsd/include/readpassphrase.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/readpassphrase.h,v 1.5 2003/06/17 21:56:23 millert Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2000, 2002 Todd C. Miller 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | * 18 | * Sponsored in part by the Defense Advanced Research Projects 19 | * Agency (DARPA) and Air Force Research Laboratory, Air Force 20 | * Materiel Command, USAF, under agreement number F39502-99-1-0512. 21 | */ 22 | 23 | #ifndef _READPASSPHRASE_H_ 24 | #define _READPASSPHRASE_H_ 25 | 26 | #define RPP_ECHO_OFF 0x00 /* Turn off echo (default). */ 27 | #define RPP_ECHO_ON 0x01 /* Leave echo on. */ 28 | #define RPP_REQUIRE_TTY 0x02 /* Fail if there is no tty. */ 29 | #define RPP_FORCELOWER 0x04 /* Force input to lower case. */ 30 | #define RPP_FORCEUPPER 0x08 /* Force input to upper case. */ 31 | #define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */ 32 | #define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */ 33 | 34 | #include 35 | 36 | __BEGIN_DECLS 37 | char * readpassphrase(const char *, char *, size_t, int); 38 | __END_DECLS 39 | 40 | #endif /* !_READPASSPHRASE_H_ */ 41 | -------------------------------------------------------------------------------- /openbsd/include/search.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/search.h,v 1.9 2012/07/10 11:44:55 guenther Exp $ */ 2 | /* $NetBSD: search.h,v 1.9 1995/08/08 21:14:45 jtc Exp $ */ 3 | 4 | /* 5 | * Written by J.T. Conklin 6 | * Public domain. 7 | */ 8 | 9 | #ifndef _SEARCH_H_ 10 | #define _SEARCH_H_ 11 | 12 | #include 13 | #include 14 | 15 | #ifndef _SIZE_T_DEFINED_ 16 | #define _SIZE_T_DEFINED_ 17 | typedef __size_t size_t; 18 | #endif 19 | 20 | typedef struct entry { 21 | char *key; 22 | void *data; 23 | } ENTRY; 24 | 25 | typedef enum { 26 | FIND, ENTER 27 | } ACTION; 28 | 29 | typedef enum { 30 | preorder, 31 | postorder, 32 | endorder, 33 | leaf 34 | } VISIT; 35 | 36 | __BEGIN_DECLS 37 | int hcreate(size_t); 38 | void hdestroy(void); 39 | ENTRY *hsearch(ENTRY, ACTION); 40 | 41 | void *lfind(const void *, const void *, size_t *, size_t, 42 | int (*)(const void *, const void *)); 43 | void *lsearch(const void *, const void *, size_t *, size_t, 44 | int (*)(const void *, const void *)); 45 | void insque(void *, void *); 46 | void remque(void *); 47 | 48 | void *tdelete(const void * __restrict, void ** __restrict, 49 | int (*)(const void *, const void *)); 50 | void *tfind(const void *, void * const *, 51 | int (*)(const void *, const void *)); 52 | void *tsearch(const void *, void **, 53 | int (*)(const void *, const void *)); 54 | void twalk(const void *, void (*)(const void *, VISIT, int)); 55 | __END_DECLS 56 | 57 | #endif /* !_SEARCH_H_ */ 58 | -------------------------------------------------------------------------------- /openbsd/include/stdbool.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/stdbool.h,v 1.6 2014/03/16 18:38:30 guenther Exp $ */ 2 | 3 | /* 4 | * Written by Marc Espie, September 25, 1999 5 | * Public domain. 6 | */ 7 | 8 | #ifndef _STDBOOL_H_ 9 | #define _STDBOOL_H_ 10 | 11 | #ifndef __cplusplus 12 | 13 | #if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__PCC__) 14 | /* Support for _C99: type _Bool is already built-in. */ 15 | #define false 0 16 | #define true 1 17 | 18 | #else 19 | /* `_Bool' type must promote to `int' or `unsigned int'. */ 20 | typedef enum { 21 | false = 0, 22 | true = 1 23 | } _Bool; 24 | 25 | /* And those constants must also be available as macros. */ 26 | #define false false 27 | #define true true 28 | 29 | #endif 30 | 31 | /* User visible type `bool' is provided as a macro which may be redefined */ 32 | #define bool _Bool 33 | 34 | #else /* __cplusplus */ 35 | #define _Bool bool 36 | #define bool bool 37 | #define false false 38 | #define true true 39 | #endif /* __cplusplus */ 40 | 41 | /* Inform that everything is fine */ 42 | #define __bool_true_false_are_defined 1 43 | 44 | #endif /* _STDBOOL_H_ */ 45 | -------------------------------------------------------------------------------- /openbsd/include/strings.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/include/strings.h,v 1.3 2003/06/02 19:34:12 millert Exp $ */ 2 | /* $NetBSD: strings.h,v 1.3 1994/10/26 00:56:31 cgd Exp $ */ 3 | 4 | /*- 5 | * Copyright (c) 1990 The Regents of the University of California. 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. Neither the name of the University nor the names of its contributors 17 | * may be used to endorse or promote products derived from this software 18 | * without specific prior written permission. 19 | * 20 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 | * SUCH DAMAGE. 31 | * 32 | * @(#)strings.h 5.8 (Berkeley) 5/15/90 33 | */ 34 | 35 | #include 36 | -------------------------------------------------------------------------------- /openbsd/lib/Makefile: -------------------------------------------------------------------------------- 1 | include ../../Makefile.inc 2 | 3 | all: 4 | @${MAKE} -C libc 5 | @${MAKE} -C libdl 6 | @${MAKE} -C libsocket 7 | @${MAKE} -C libutil 8 | 9 | includes-local: 10 | @/bin/cp -rvu include/* ${INCDIR}/ 11 | 12 | install-local: 13 | @${MAKE} -C libc install-local 14 | @${MAKE} -C libdl install-local 15 | @${MAKE} -C libsocket install-local 16 | @${MAKE} -C libutil install-local 17 | 18 | clean: 19 | @${MAKE} -C libc clean 20 | @${MAKE} -C libdl clean 21 | @${MAKE} -C libsocket clean 22 | @${MAKE} -C libutil clean 23 | 24 | install: 25 | @${MAKE} -C libc install 26 | @${MAKE} -C libdl install 27 | @${MAKE} -C libsocket install 28 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/Makefile: -------------------------------------------------------------------------------- 1 | .SUFFIXES: 2 | .DEFAULT: 3 | 4 | all: string.d gen.d net.d sys.d 5 | 6 | %.d: ${ARCH}/% 7 | @${MAKE} -C $< CFLAGS="${CFLAGS}" SRCDIR=${SRCDIR} ARCH=${ARCH} 8 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/gen/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=_setjmp.o fabs.o infinity.c.o ldexp.c.o \ 2 | modf.o nan.c.o setjmp.o sigsetjmp.o 3 | OBJECTS+=fpclassifyl.c.o isfinitel.c.o isinfl.c.o isnanl.c.o isnormall.c.o signbitl.c.o 4 | OBJECTS+=flt_rounds.o fpgetmask.o fpgetround.o fpgetsticky.o fpsetmask.o \ 5 | fpsetround.o fpsetsticky.o 6 | OBJECTS+=divsi3.o fixdfsi.o fixunsdfsi.o udivsi3.o 7 | 8 | .SUFFIXES: 9 | .DEFAULT: 10 | 11 | all: ${OBJECTS} 12 | 13 | %.c.o: ${SRCDIR}/arch/i386/gen/%.c 14 | gcc -c ${CFLAGS} -o $@ $< 15 | 16 | %.o: ${SRCDIR}/arch/i386/gen/%.S 17 | gcc -c ${CFLAGS} -o $@ $< 18 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/net/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=htonl.o htons.o ntohl.o ntohs.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/arch/i386/net/%.S 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/string/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=bcmp.o bcopy.o bzero.o ffs.o index.o memchr.o memcmp.o memset.o \ 2 | rindex.o strcat.o strcmp.o strcpy.o strlen.c.o \ 3 | strncmp.o strpbrk.c.o strsep.c.o \ 4 | strstr.c.o swab.o 5 | OBJECTS+=memcpy.o memmove.o strchr.o strrchr.o 6 | OBJECTS+= strncat.c.o strncpy.c.o strcspn.c.o strlcpy.c.o strspn.c.o 7 | 8 | .SUFFIXES: 9 | .DEFAULT: 10 | 11 | all: ${OBJECTS} 12 | 13 | %.o: ${SRCDIR}/arch/${ARCH}/string/%.S 14 | gcc -c ${CFLAGS} -o $@ $< 15 | 16 | %.c.o: ${SRCDIR}/string/%.c 17 | gcc -c ${CFLAGS} -o $@ $< 18 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/Makefile: -------------------------------------------------------------------------------- 1 | #OBJECTS=syscall.S.o fork.S.o vfork.S.o cerror.S.o 2 | OBJECTS=syscall.S.o fork.S.o vfork.S.o 3 | OBJECTS+=_exit.S.o _getlogin.S.o _setlogin.S.o 4 | 5 | .SUFFIXES: 6 | .DEFAULT: 7 | 8 | all: ${OBJECTS} 9 | 10 | %.o: ${SRCDIR}/arch/${ARCH}/sys/%.S 11 | gcc -c ${CFLAGS} -o $@ $< 12 | 13 | %.S.o: %.S 14 | gcc -c ${CFLAGS} -I.. -o $@ $< 15 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/_exit.S: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | ENTRY(_exit) 4 | pop %ecx 5 | mov $SYS_exit,%eax 6 | call ___kernel 7 | push %ecx 8 | ret 9 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/_getlogin.S: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | ENTRY(_getlogin) 4 | pop %ecx 5 | mov $SYS_getlogin,%eax 6 | call ___kernel 7 | push %ecx 8 | ret 9 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/_setlogin.S: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | ENTRY(_setlogin) 4 | pop %ecx 5 | mov $SYS_setlogin,%eax 6 | call ___kernel 7 | push %ecx 8 | ret 9 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/fork.S: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | ENTRY(fork) 4 | push %fs:0x2c 5 | call ___tls_copy 6 | add $4,%esp 7 | pop %ecx 8 | mov $SYS_fork,%eax 9 | call ___kernel 10 | push %ecx 11 | ret 12 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/syscall.S: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | ENTRY(syscall) 4 | pop %ecx 5 | pop %eax 6 | call ___kernel 7 | push %ecx 8 | ret 9 | -------------------------------------------------------------------------------- /openbsd/lib/libc/arch/i386/sys/vfork.S: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | ENTRY(vfork) 4 | push %fs:0x2c 5 | call ___tls_copy 6 | add $4,%esp 7 | pop %ecx 8 | mov $SYS_vfork,%eax 9 | call ___kernel 10 | push %ecx 11 | ret 12 | -------------------------------------------------------------------------------- /openbsd/lib/libc/citrus/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS = citrus_ctype.o citrus_none.o citrus_utf8.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/citrus/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/compat-43/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/compat-43/ 2 | 3 | MAN+= creat.3 getdtablesize.3 gethostid.3 killpg.3 \ 4 | sigblock.3 sigpause.3 sigsetmask.3 sigvec.3 5 | 6 | MLINKS+=gethostid.3 sethostid.3 7 | MLINKS+=sigblock.3 sigmask.3 8 | 9 | .include 10 | -------------------------------------------------------------------------------- /openbsd/lib/libc/compat-43/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS= creat.o getdtablesize.o getwd.o \ 2 | setpgrp.o sigcompat.o killpg.o gethostid.o sethostid.o 3 | 4 | .SUFFIXES: 5 | .DEFAULT: 6 | 7 | all: ${OBJECTS} 8 | 9 | %.o: ${SRCDIR}/compat-43/%.c 10 | gcc -c ${CFLAGS} -o $@ $< 11 | 12 | testlib: ${OBJECTS} 13 | gcc -shared -e "" -Wl,--disable-auto-import -o testlib.dll ${OBJECTS} 14 | 15 | libcompat-43.a: ${OBJECTS} 16 | ar cru libcompat-43.a ${OBJECTS} 17 | 18 | clean: 19 | rm -f *.o *.dll *.a 20 | -------------------------------------------------------------------------------- /openbsd/lib/libc/crypt/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/crypt/ 2 | 3 | MAN+= crypt.3 blowfish.3 arc4random.3 4 | MLINKS+=crypt.3 setkey.3 crypt.3 crypt_checkpass.3 crypt.3 encrypt.3 5 | MLINKS+=crypt.3 des_setkey.3 crypt.3 des_cipher.3 6 | MLINKS+=crypt.3 bcrypt_gensalt.3 crypt.3 bcrypt.3 7 | MLINKS+=blowfish.3 blf_key.3 blowfish.3 blf_enc.3 8 | MLINKS+=blowfish.3 blf_dec.3 blowfish.3 blf_ecb_encrypt.3 9 | MLINKS+=blowfish.3 blf_ecb_decrypt.3 blowfish.3 blf_cbc_encrypt.3 10 | MLINKS+=blowfish.3 blf_cbc_decrypt.3 11 | MLINKS+=arc4random.3 arc4random_buf.3 arc4random.3 arc4random_uniform.3 12 | 13 | .include 14 | -------------------------------------------------------------------------------- /openbsd/lib/libc/crypt/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=crypt.o crypt2.o cryptutil.o blowfish.o bcrypt.o arc4random.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/crypt/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/db/man/ 2 | 3 | MAN+= btree.3 dbm.3 dbopen.3 hash.3 mpool.3 ndbm.3 recno.3 4 | 5 | MLINKS+= dbopen.3 db.3 6 | MLINKS+= dbm.3 dbminit.3 dbm.3 dbmclose.3 dbm.3 fetch.3 dbm.3 store.3 7 | MLINKS+= dbm.3 delete.3 dbm.3 firstkey.3 dbm.3 nextkey.3 8 | MLINKS+= mpool.3 mpool_open.3 mpool.3 mpool_filter.3 mpool.3 mpool_new.3 9 | MLINKS+= mpool.3 mpool_delete.3 mpool.3 mpool_get.3 mpool.3 mpool_put.3 10 | MLINKS+= mpool.3 mpool_sync.3 mpool.3 mpool_close.3 11 | MLINKS+= ndbm.3 dbm_clearerr.3 ndbm.3 dbm_close.3 ndbm.3 dbm_delete.3 12 | MLINKS+= ndbm.3 dbm_dirfno.3 ndbm.3 dbm_error.3 ndbm.3 dbm_fetch.3 13 | MLINKS+= ndbm.3 dbm_firstkey.3 ndbm.3 dbm_nextkey.3 ndbm.3 dbm_open.3 14 | MLINKS+= ndbm.3 dbm_pagfno.3 ndbm.3 dbm_rdonly.3 ndbm.3 dbm_store.3 15 | 16 | .include 17 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS+=-D__DBINTERFACE_PRIVATE 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: btree.d db.d hash.d mpool.d recno.d 7 | 8 | %.d: % 9 | @CFLAGS="${CFLAGS}" ${MAKE} -C $< SRCDIR=${SRCDIR} ARCH=${ARCH} 10 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/btree/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=bt_close.o bt_conv.o bt_debug.o bt_delete.o bt_get.o bt_open.o \ 2 | bt_overflow.o bt_page.o bt_put.o bt_search.o bt_seq.o bt_split.o \ 3 | bt_utils.o 4 | 5 | .SUFFIXES: 6 | .DEFAULT: 7 | 8 | all: ${OBJECTS} 9 | 10 | %.o: ${SRCDIR}/db/btree/%.c 11 | gcc -c ${CFLAGS} -o $@ $< 12 | 13 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/db/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=db.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/db/db/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/hash/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=hash.o hash_bigkey.o hash_buf.o hash_func.o hash_log2.o \ 2 | hash_page.o ndbm.o 3 | 4 | .SUFFIXES: 5 | .DEFAULT: 6 | 7 | all: ${OBJECTS} 8 | 9 | %.o: ${SRCDIR}/db/hash/%.c 10 | gcc -c ${CFLAGS} -o $@ $< 11 | 12 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/mpool/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=mpool.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/db/mpool/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/db/recno/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=rec_close.o rec_delete.o rec_get.o rec_open.o rec_put.o rec_search.o \ 2 | rec_seq.o rec_utils.o 3 | 4 | .SUFFIXES: 5 | .DEFAULT: 6 | 7 | all: ${OBJECTS} 8 | 9 | %.o: ${SRCDIR}/db/recno/%.c 10 | gcc -c ${CFLAGS} -o $@ $< 11 | 12 | -------------------------------------------------------------------------------- /openbsd/lib/libc/dlfcn/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=dlfcn_stubs.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/dlfcn/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/gdtoa/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=dmisc.o dtoa.o gdtoa.o gmisc.o hd_init.o \ 2 | hexnan.o locks.o misc.o smisc.o \ 3 | strtold.o sum.o ulp.o 4 | 5 | OBJECTS+= hdtoa.o ldtoa.o strtod.o strtord.o strtodg.o strtof.o gethex.o 6 | 7 | .SUFFIXES: 8 | .DEFAULT: 9 | 10 | all: ${OBJECTS} 11 | 12 | %.o: ${SRCDIR}/gdtoa/%.c 13 | gcc -c ${CFLAGS} -I${SRCDIR}/arch/${ARCH}/gdtoa -o $@ $< 14 | 15 | testlib: ${OBJECTS} 16 | gcc -shared -e "" -Wl,--disable-auto-import -o test.dll ${OBJECTS} ../gen/libgen.a 17 | 18 | libgdtoa.a: ${OBJECTS} 19 | ar cru libgdtoa.a ${OBJECTS} 20 | 21 | clean: 22 | rm -f *.o *.dll *.a 23 | -------------------------------------------------------------------------------- /openbsd/lib/libc/gen/getprogname.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/lib/libc/gen/getprogname.c,v 1.3 2013/11/12 06:09:48 deraadt Exp $ */ 2 | /* 3 | * Copyright (c) 2013 Antoine Jacoutot 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include 19 | 20 | //extern const char *__progname; 21 | 22 | const char * 23 | getprogname(void) 24 | { 25 | return (__progname); 26 | } 27 | -------------------------------------------------------------------------------- /openbsd/lib/libc/gen/setprogname.c: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/lib/libc/gen/setprogname.c,v 1.4 2013/11/12 06:09:48 deraadt Exp $ */ 2 | /* 3 | * Copyright (c) 2013 Antoine Jacoutot 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #include 19 | #include 20 | 21 | //extern const char *__progname; 22 | 23 | void 24 | setprogname(const char *progname) 25 | { 26 | const char *tmpn; 27 | 28 | tmpn = strrchr(progname, '/'); 29 | if (tmpn == NULL) 30 | __progname = (char *)progname; 31 | else 32 | __progname = (char *)tmpn + 1; 33 | } 34 | -------------------------------------------------------------------------------- /openbsd/lib/libc/gmon/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/gmon/ 2 | 3 | MAN+= moncontrol.3 4 | 5 | MLINKS+=moncontrol.3 monstartup.3 6 | 7 | .include 8 | -------------------------------------------------------------------------------- /openbsd/lib/libc/gmon/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=gmon.o mcount.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/gmon/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | -------------------------------------------------------------------------------- /openbsd/lib/libc/hash/Makefile: -------------------------------------------------------------------------------- 1 | HELPER=md5hl.c rmd160hl.c sha1hl.c sha224hl.c sha256hl.c sha384hl.c sha512hl.c 2 | OBJECTS=md5hl.o rmd160hl.o sha1hl.o sha224hl.o sha256hl.o sha384hl.o sha512hl.o \ 3 | md5.o rmd160.o sha1.o sha2.o 4 | 5 | .SUFFIXES: 6 | .DEFAULT: 7 | 8 | all: ${HELPER} ${OBJECTS} 9 | 10 | %.c: ${SRCDIR}/hash/%.c 11 | cp $< $@ 12 | 13 | %.o: %.c 14 | gcc -c ${CFLAGS} -o $@ $< 15 | 16 | testlib: ${HELPER} ${OBJECTS} 17 | gcc -shared -e "" --disable-auto-import -o testlib.dll ${OBJECTS} 18 | 19 | libhash.a: ${OBJECTS} 20 | ar cru $@ ${OBJECTS} 21 | 22 | clean: 23 | rm -f ${HELPER} *.o *.dll *.a 24 | 25 | md5hl.c: ${SRCDIR}/hash/helper.c 26 | sed -e 's/hashinc/md5.h/g' -e 's/HASH/MD5/g' $< > $@ 27 | 28 | rmd160hl.c: ${SRCDIR}/hash/helper.c 29 | sed -e 's/hashinc/rmd160.h/g' -e 's/HASH/RMD160/g' $< > $@ 30 | 31 | sha1hl.c: ${SRCDIR}/hash/helper.c 32 | sed -e 's/hashinc/sha1.h/g' -e 's/HASH/SHA1/g' $< > $@ 33 | 34 | sha224hl.c: ${SRCDIR}/hash/helper.c 35 | sed -e 's/hashinc/sha2.h/g' \ 36 | -e 's/HASH/SHA224/g' \ 37 | -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@ 38 | 39 | sha256hl.c: ${SRCDIR}/hash/helper.c 40 | sed -e 's/hashinc/sha2.h/g' \ 41 | -e 's/HASH/SHA256/g' \ 42 | -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@ 43 | 44 | sha384hl.c: ${SRCDIR}/hash/helper.c 45 | sed -e 's/hashinc/sha2.h/g' \ 46 | -e 's/HASH/SHA384/g' \ 47 | -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@ 48 | 49 | sha512hl.c: ${SRCDIR}/hash/helper.c 50 | sed -e 's/hashinc/sha2.h/g' \ 51 | -e 's/HASH/SHA512/g' \ 52 | -e 's/SHA[0-9][0-9][0-9]_CTX/SHA2_CTX/g' $< > $@ 53 | -------------------------------------------------------------------------------- /openbsd/lib/libc/include/ctype_private.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/lib/libc/include/ctype_private.h,v 1.1 2005/08/08 05:53:00 espie Exp $ */ 2 | /* Written by Marc Espie, public domain */ 3 | #define CTYPE_NUM_CHARS 256 4 | extern const char _C_ctype_[]; 5 | extern const short _C_toupper_[]; 6 | extern const short _C_tolower_[]; 7 | 8 | -------------------------------------------------------------------------------- /openbsd/lib/libc/include/namespace.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/lib/libc/include/namespace.h,v 1.2 1996/08/19 08:28:08 tholo Exp $ */ 2 | 3 | #define catclose _catclose 4 | #define catgets _catgets 5 | #define catopen _catopen 6 | #define err _err 7 | #define errx _errx 8 | #define strtoq _strtoq 9 | #define strtouq _strtouq 10 | #define sys_errlist _sys_errlist 11 | #define sys_nerr _sys_nerr 12 | #define sys_siglist _sys_siglist 13 | #define verr _verr 14 | #define verrx _verrx 15 | #define vwarn _vwarn 16 | #define vwarnx _vwarnx 17 | #define warn _warn 18 | #define warnx _warnx 19 | -------------------------------------------------------------------------------- /openbsd/lib/libc/libmsvcrt.def: -------------------------------------------------------------------------------- 1 | LIBRARY msvcrt.dll 2 | EXPORTS 3 | calloc 4 | free 5 | malloc 6 | realloc 7 | -------------------------------------------------------------------------------- /openbsd/lib/libc/locale/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/locale/ 2 | 3 | MAN+= nl_langinfo.3 setlocale.3 iswalnum.3 towlower.3 \ 4 | btowc.3 mblen.3 mbrlen.3 mbrtowc.3 mbsinit.3 mbsrtowcs.3 \ 5 | mbstowcs.3 mbtowc.3 wcrtomb.3 wcsrtombs.3 wcstod.3 wcstol.3 \ 6 | wcstombs.3 wctob.3 wctomb.3 \ 7 | wctype.3 iswctype.3 wctrans.3 towctrans.3 wcwidth.3 8 | MLINKS+=setlocale.3 localeconv.3 \ 9 | iswalnum.3 iswalpha.3 \ 10 | iswalnum.3 iswblank.3 \ 11 | iswalnum.3 iswcntrl.3 \ 12 | iswalnum.3 iswdigit.3 \ 13 | iswalnum.3 iswgraph.3 \ 14 | iswalnum.3 iswlower.3 \ 15 | iswalnum.3 iswprint.3 \ 16 | iswalnum.3 iswpunct.3 \ 17 | iswalnum.3 iswspace.3 \ 18 | iswalnum.3 iswupper.3 \ 19 | iswalnum.3 iswxdigit.3 \ 20 | towlower.3 towupper.3 \ 21 | wcstod.3 wcstof.3 \ 22 | wcstod.3 wcstold.3 \ 23 | wcstol.3 wcstoul.3 \ 24 | wcstol.3 wcstoll.3 \ 25 | wcstol.3 wcstoull.3 \ 26 | wcstol.3 wcstoimax.3 \ 27 | wcstol.3 wcstoumax.3 \ 28 | mbsrtowcs.3 mbsnrtowcs.3 \ 29 | wcsrtombs.3 wcsnrtombs.3 30 | 31 | .include 32 | -------------------------------------------------------------------------------- /openbsd/lib/libc/locale/Makefile: -------------------------------------------------------------------------------- 1 | # for LOCALECHARSETS 2 | include ${SRCDIR}/../../share/locale/ctype/Makefile.inc 3 | 4 | OBJECTS= btowc.o _def_messages.o _def_monetary.o _def_numeric.o _def_time.o \ 5 | localeconv.o nl_langinfo.o setlocale.o iswctype.o __mb_cur_max.o \ 6 | mblen.o mbrlen.o mbstowcs.o mbtowc.o multibyte_citrus.o wcscoll.o \ 7 | wcstombs.o wctob.o wctomb.o wcstod.o wcstol.o \ 8 | wcstoul.o wcstoll.o wcstoull.o wcstoimax.o wcstoumax.o \ 9 | setrunelocale.o runeglue.o rune.o runetable.o ___runetype_mb.o \ 10 | _wctrans.o wcsxfrm.o 11 | 12 | OBJECTS+= wcstof.o wcstold.o 13 | 14 | .SUFFIXES: 15 | .DEFAULT: 16 | 17 | all: ${OBJECTS} 18 | 19 | %.o: ${SRCDIR}/locale/%.c 20 | gcc -c ${CFLAGS} -DLOCALE_CHARSETS="\"${LOCALECHARSETS}\"" -I${SRCDIR}/include -I${SRCDIR}/citrus -o $@ $< 21 | 22 | # runetable.c does not match gen/ctype_.c 23 | # %.c.o: %.c 24 | # gcc -c ${CFLAGS} -DLOCALE_CHARSETS="\"${LOCALECHARSETS}\"" -I${SRCDIR}/locale -I${SRCDIR}/citrus -o $@ $< 25 | 26 | -------------------------------------------------------------------------------- /openbsd/lib/libc/net/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS= send.o recv.o herror.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/net/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/nls/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=catclose.o catgets.o catopen.o 2 | OBJECTS+=_catclose.o _catgets.o _catopen.o 3 | 4 | .SUFFIXES: 5 | .DEFAULT: 6 | 7 | all: ${OBJECTS} 8 | 9 | %.o: ${SRCDIR}/nls/%.c 10 | gcc -c ${CFLAGS} -o $@ $< 11 | 12 | -------------------------------------------------------------------------------- /openbsd/lib/libc/quad/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=adddi3.o anddi3.o ashldi3.o ashrdi3.o cmpdi2.o divdi3.o fixdfdi.o \ 2 | fixsfdi.o fixunsdfdi.o fixunssfdi.o floatdidf.o floatdisf.o \ 3 | floatunsdidf.o iordi3.o lshldi3.o lshrdi3.o moddi3.o muldi3.o \ 4 | negdi2.o notdi2.o qdivrem.o subdi3.o ucmpdi2.o udivdi3.o umoddi3.o \ 5 | xordi3.o 6 | KOBJECTS=adddi3.o anddi3.o ashldi3.o ashrdi3.o cmpdi2.o divdi3.o iordi3.o \ 7 | lshldi3.o lshrdi3.o moddi3.o muldi3.o negdi2.o notdi2.o qdivrem.o \ 8 | subdi3.o ucmpdi2.o udivdi3.o umoddi3.o xordi3.o 9 | 10 | .SUFFIXES: 11 | .DEFAULT: 12 | 13 | all: ${OBJECTS} 14 | 15 | %.o: ${SRCDIR}/quad/%.c 16 | gcc -c ${CFLAGS} -o $@ $< 17 | 18 | -------------------------------------------------------------------------------- /openbsd/lib/libc/regex/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/regex/ 2 | 3 | MAN+= regex.3 re_format.7 4 | 5 | MLINKS+=regex.3 regcomp.3 regex.3 regexec.3 regex.3 regerror.3 regex.3 regfree.3 6 | 7 | .include 8 | -------------------------------------------------------------------------------- /openbsd/lib/libc/regex/Makefile: -------------------------------------------------------------------------------- 1 | CPPFLAGS= -Wl,--disable-auto-import 2 | 3 | OBJECTS = regcomp.o regerror.o regexec.o regfree.o 4 | 5 | .SUFFIXES: 6 | .DEFAULT: 7 | 8 | all: ${OBJECTS} 9 | 10 | %.o: ${SRCDIR}/regex/%.c 11 | gcc -c ${CFLAGS} -o $@ $< 12 | 13 | testlib: ${OBJECTS} 14 | gcc -shared ${CPPFLAGS} -e "" -Wl,--disable-auto-import -o testlib.dll ${OBJECTS} \ 15 | ../libc.o ../stdlib/libstd.a 16 | 17 | libregex.a: ${OBJECTS} 18 | ar cru libregex.a ${OBJECTS} 19 | 20 | clean: 21 | rm -f *.o *.dll *.a 22 | -------------------------------------------------------------------------------- /openbsd/lib/libc/stdio/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/stdio/ 2 | 3 | MAN+= fclose.3 ferror.3 fflush.3 fgetln.3 fgets.3 fmemopen.3 fopen.3 fputs.3 \ 4 | fread.3 fseek.3 funopen.3 getc.3 mktemp.3 open_memstream.3 perror.3 \ 5 | printf.3 putc.3 remove.3 scanf.3 setbuf.3 stdio.3 tmpnam.3 ungetc.3 \ 6 | fgetws.3 fputws.3 fwide.3 getwc.3 putwc.3 ungetwc.3 wprintf.3 wscanf.3 \ 7 | getdelim.3 8 | 9 | MLINKS+=ferror.3 clearerr.3 ferror.3 feof.3 ferror.3 fileno.3 10 | MLINKS+=fflush.3 fpurge.3 11 | MLINKS+=fopen.3 fdopen.3 fopen.3 freopen.3 12 | MLINKS+=fputs.3 puts.3 13 | MLINKS+=fread.3 fwrite.3 14 | MLINKS+=fseek.3 fgetpos.3 fseek.3 fsetpos.3 fseek.3 ftell.3 fseek.3 rewind.3 15 | MLINKS+=fseek.3 fseeko.3 fseek.3 ftello.3 16 | MLINKS+=funopen.3 fropen.3 funopen.3 fwopen.3 17 | MLINKS+=getc.3 fgetc.3 getc.3 getchar.3 getc.3 getw.3 18 | MLINKS+=getdelim.3 getline.3 19 | MLINKS+=mktemp.3 mkstemp.3 20 | MLINKS+=mktemp.3 mkdtemp.3 21 | MLINKS+=mktemp.3 mkstemps.3 22 | MLINKS+=open_memstream.3 open_wmemstream.3 23 | MLINKS+=printf.3 fprintf.3 printf.3 snprintf.3 printf.3 sprintf.3 \ 24 | printf.3 vfprintf.3 printf.3 vprintf.3 printf.3 vsnprintf.3 \ 25 | printf.3 vsprintf.3 printf.3 asprintf.3 printf.3 vasprintf.3 \ 26 | printf.3 dprintf.3 printf.3 vdprintf.3 27 | MLINKS+=putc.3 fputc.3 putc.3 putchar.3 putc.3 putw.3 28 | MLINKS+=scanf.3 fscanf.3 scanf.3 sscanf.3 scanf.3 vfscanf.3 scanf.3 vscanf.3 \ 29 | scanf.3 vsscanf.3 30 | MLINKS+=setbuf.3 setbuffer.3 setbuf.3 setlinebuf.3 setbuf.3 setvbuf.3 31 | MLINKS+=tmpnam.3 tempnam.3 tmpnam.3 tmpfile.3 32 | MLINKS+=wprintf.3 fwprintf.3 wprintf.3 swprintf.3 wprintf.3 vwprintf.3 \ 33 | wprintf.3 vfwprintf.3 wprintf.3 vswprintf.3 34 | MLINKS+=wscanf.3 fwscanf.3 wscanf.3 swscanf.3 wscanf.3 vfwscanf.3 wscanf.3 \ 35 | vswscanf.3 wscanf.3 vwscanf.3 36 | 37 | MLINKS+=getwc.3 fgetwc.3 getwc.3 getwchar.3 38 | MLINKS+=putwc.3 fputwc.3 putwc.3 putwchar.3 39 | 40 | .include 41 | -------------------------------------------------------------------------------- /openbsd/lib/libc/stdio/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS= asprintf.o clrerr.o fclose.o fdopen.o feof.o ferror.o fflush.o fgetc.o \ 2 | fgetln.o fgetpos.o fgets.o fileno.o findfp.o flags.o fmemopen.o \ 3 | fopen.o fprintf.o fpurge.o fputc.o fputs.o fread.o freopen.o fscanf.o \ 4 | fseek.o fsetpos.o ftell.o funopen.o fvwrite.o fwalk.o fwrite.o \ 5 | getc.o getchar.o getw.o makebuf.o mktemp.o open_memstream.o \ 6 | perror.o printf.o putc.o putchar.o puts.o putw.o \ 7 | refill.o remove.o rewind.o rget.o scanf.o setbuf.o setbuffer.o \ 8 | setvbuf.o snprintf.o sprintf.o sscanf.o stdio.o tempnam.o tmpfile.o \ 9 | tmpnam.o ungetc.o vasprintf.o vfprintf.o vfscanf.o vprintf.o vscanf.o \ 10 | vsnprintf.o vsprintf.o vsscanf.o wbuf.o wsetup.o flockfile.o \ 11 | fgetwc.o fgetws.o fputwc.o fputws.o fwide.o getwc.o getwchar.o \ 12 | putwc.o putwchar.o ungetwc.o \ 13 | fwprintf.o swprintf.o vfwprintf.o vswprintf.o vwprintf.o wprintf.o \ 14 | fwscanf.o swscanf.o vfwscanf.o vswscanf.o vwscanf.o wscanf.o \ 15 | getdelim.o getline.o dprintf.o vdprintf.o 16 | 17 | CFLAGS+=-DFLOATING_POINT -DPRINTF_WIDE_CHAR -DSCANF_WIDE_CHAR 18 | 19 | .SUFFIXES: 20 | .DEFAULT: 21 | 22 | all: ${OBJECTS} 23 | 24 | %.o: ${SRCDIR}/stdio/%.c 25 | gcc -c ${CFLAGS} -I${SRCDIR}/gdtoa -I${SRCDIR}/arch/${ARCH}/gdtoa -o $@ $< 26 | 27 | -------------------------------------------------------------------------------- /openbsd/lib/libc/stdlib/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/stdlib/ 2 | 3 | MAN+= a64l.3 abort.3 abs.3 alloca.3 atexit.3 atof.3 atoi.3 atol.3 atoll.3 \ 4 | bsearch.3 div.3 ecvt.3 exit.3 getenv.3 getopt.3 getopt_long.3 \ 5 | getsubopt.3 hcreate.3 imaxabs.3 imaxdiv.3 insque.3 labs.3 ldiv.3 \ 6 | lldiv.3 lsearch.3 malloc.3 posix_memalign.3 posix_openpt.3 ptsname.3 \ 7 | qabs.3 qdiv.3 qsort.3 radixsort.3 rand48.3 rand.3 random.3 realpath.3 \ 8 | strtod.3 strtonum.3 strtol.3 strtoul.3 system.3 tsearch.3 9 | 10 | MLINKS+=ecvt.3 fcvt.3 ecvt.3 gcvt.3 11 | MLINKS+=getenv.3 setenv.3 getenv.3 unsetenv.3 getenv.3 putenv.3 12 | MLINKS+=getopt_long.3 getopt_long_only.3 13 | MLINKS+=hcreate.3 hdestroy.3 hcreate.3 hsearch.3 14 | MLINKS+=insque.3 remque.3 15 | MLINKS+=labs.3 llabs.3 16 | MLINKS+=lsearch.3 lfind.3 17 | MLINKS+=malloc.3 free.3 malloc.3 realloc.3 malloc.3 calloc.3 18 | MLINKS+=malloc.3 reallocarray.3 malloc.3 cfree.3 malloc.3 malloc.conf.5 19 | MLINKS+=qsort.3 heapsort.3 qsort.3 mergesort.3 20 | MLINKS+=radixsort.3 sradixsort.3 21 | MLINKS+=rand.3 srand.3 rand.3 rand_r.3 22 | MLINKS+=random.3 initstate.3 random.3 setstate.3 23 | MLINKS+=random.3 srandom.3 random.3 srandomdev.3 24 | MLINKS+=rand48.3 drand48.3 rand48.3 erand48.3 rand48.3 lrand48.3 25 | MLINKS+=rand48.3 mrand48.3 rand48.3 nrand48.3 rand48.3 jrand48.3 26 | MLINKS+=rand48.3 srand48.3 rand48.3 seed48.3 rand48.3 lcong48.3 27 | MLINKS+=ptsname.3 grantpt.3 ptsname.3 unlockpt.3 28 | MLINKS+=strtod.3 strtof.3 strtod.3 strtold.3 29 | MLINKS+=strtol.3 strtoll.3 strtol.3 strtoq.3 strtol.3 strtoimax.3 30 | MLINKS+=strtoul.3 strtoull.3 strtoul.3 strtouq.3 strtoul.3 strtoumax.3 31 | MLINKS+=tsearch.3 tfind.3 32 | MLINKS+=tsearch.3 tdelete.3 33 | MLINKS+=tsearch.3 twalk.3 34 | MLINKS+=a64l.3 l64a.3 35 | 36 | .include 37 | -------------------------------------------------------------------------------- /openbsd/lib/libc/stdlib/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS = a64l.o atoi.o atof.o atol.o atoll.o bsearch.o \ 2 | cfree.o getenv.o random.o \ 3 | getsubopt.o heapsort.o imaxabs.o imaxdiv.o l64a.o llabs.o \ 4 | lldiv.o lsearch.o reallocarray.o merge.o posix_pty.o \ 5 | qsort.o radixsort.o setenv.o strtoimax.o \ 6 | strtol.o strtoll.o strtonum.o strtoul.o strtoull.o strtoumax.o \ 7 | system.o tfind.o tsearch.o _rand48.o drand48.o erand48.o jrand48.o \ 8 | lcong48.o lrand48.o mrand48.o nrand48.o seed48.o srand48.o qabs.o \ 9 | qdiv.o _Exit.o exit.o abort.o rand.o realpath.o \ 10 | div.o hcreate.o getopt_long.o 11 | 12 | OBJECTS+= atexit.c.o 13 | 14 | #OBJECTS+= ecvt.o gcvt.o malloc.o 15 | 16 | .SUFFIXES: 17 | .DEFAULT: 18 | 19 | all: ${OBJECTS} 20 | 21 | %.o: ${SRCDIR}/stdlib/%.c 22 | gcc -c ${CFLAGS} -o $@ $< 23 | 24 | %.c.o: %.c 25 | gcc -c ${CFLAGS} -I../../../../include -I${SRCDIR}/stdlib -o $@ $< 26 | 27 | 28 | -------------------------------------------------------------------------------- /openbsd/lib/libc/string/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/string/ 2 | 3 | MAN+= bcmp.3 bcopy.3 bstring.3 bzero.3 ffs.3 memccpy.3 memchr.3 \ 4 | memcmp.3 memcpy.3 memmem.3 memmove.3 memset.3 stpcpy.3 strcasecmp.3 \ 5 | strcat.3 strchr.3 strcmp.3 strcoll.3 strcpy.3 strcspn.3 strdup.3 \ 6 | strerror.3 string.3 strlen.3 strmode.3 strncat.3 strncpy.3 strpbrk.3 \ 7 | strrchr.3 strsep.3 strsignal.3 strspn.3 strstr.3 strtok.3 strxfrm.3 \ 8 | swab.3 strlcpy.3 wcscasecmp.3 wcscat.3 wcschr.3 wcscmp.3 wcscpy.3 \ 9 | wcscspn.3 wcsdup.3 wcslcpy.3 wcslen.3 wcspbrk.3 wcsrchr.3 wcsspn.3 \ 10 | wcsstr.3 wcstok.3 wcswidth.3 wmemchr.3 wmemcmp.3 wmemcpy.3 wmemmove.3 \ 11 | wmemset.3 12 | 13 | MLINKS+=bzero.3 explicit_bzero.3 14 | MLINKS+=memchr.3 memrchr.3 15 | MLINKS+=stpcpy.3 stpncpy.3 16 | MLINKS+=strchr.3 index.3 17 | MLINKS+=strrchr.3 rindex.3 18 | MLINKS+=strcasecmp.3 strncasecmp.3 19 | MLINKS+=strcmp.3 strncmp.3 20 | MLINKS+=strdup.3 strndup.3 21 | MLINKS+=strlcpy.3 strlcat.3 22 | MLINKS+=strlen.3 strnlen.3 23 | MLINKS+=strstr.3 strcasestr.3 24 | MLINKS+=strtok.3 strtok_r.3 25 | MLINKS+=strerror.3 strerror_r.3 26 | MLINKS+=wcscasecmp.3 wcsncasecmp.3 27 | MLINKS+=wcscat.3 wcsncat.3 28 | MLINKS+=wcscmp.3 wcsncmp.3 29 | MLINKS+=wcscpy.3 wcsncpy.3 30 | MLINKS+=wcslcpy.3 wcslcat.3 31 | MLINKS+=bcmp.3 timingsafe_bcmp.3 32 | 33 | .include 34 | -------------------------------------------------------------------------------- /openbsd/lib/libc/string/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=explicit_bzero.o memccpy.o memmem.o memrchr.o stpcpy.o stpncpy.o \ 2 | strcasecmp.o strcasestr.o strcoll.o strdup.o \ 3 | strerror.o strerror_r.o strlcat.o strmode.o strndup.o strnlen.o \ 4 | strsignal.o strtok.o strxfrm.o \ 5 | wcscat.o wcschr.o wcscmp.o wcscpy.o wcscspn.o wcslcat.o wcslcpy.o \ 6 | wcslen.o wcsncat.o wcsncmp.o wcsncpy.o wcspbrk.o wcsrchr.o wcsspn.o \ 7 | wcsstr.o wcstok.o wcswcs.o wcswidth.o wmemchr.o wmemcmp.o wmemcpy.o \ 8 | wmemmove.o wmemset.o wcsdup.o \ 9 | timingsafe_bcmp.o wcscasecmp.o 10 | 11 | .SUFFIXES: 12 | .DEFAULT: 13 | 14 | all: ${OBJECTS} 15 | 16 | %.o: ${SRCDIR}/string/%.c 17 | gcc -c ${CFLAGS} -I${SRCDIR} -o $@ $< 18 | 19 | -------------------------------------------------------------------------------- /openbsd/lib/libc/sys/syscall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MASTER=/usr/include/sys/syscall.h 4 | 5 | echo -n "creating system call stubs..." 6 | 7 | grep -ai '^#define' $MASTER | sed -e 's/SYS_//g' | \ 8 | { 9 | while read define name index; do 10 | if ! [ -f "$name.S" ]; then 11 | echo -n " $name.S" 12 | sed "s/NAME/$name/" syscall.template >$name.S 13 | fi 14 | done 15 | } 16 | echo " done." 17 | -------------------------------------------------------------------------------- /openbsd/lib/libc/sys/syscall.template: -------------------------------------------------------------------------------- 1 | #include "SYS.h" 2 | 3 | SYSENTRY(NAME) 4 | -------------------------------------------------------------------------------- /openbsd/lib/libc/termios/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/termios/ 2 | 3 | MAN+= tcgetpgrp.3 tcsendbreak.3 tcsetattr.3 tcsetpgrp.3 tcgetsid.3 4 | 5 | MLINKS+=tcsendbreak.3 tcdrain.3 tcsendbreak.3 tcflow.3 \ 6 | tcsendbreak.3 tcflush.3 7 | MLINKS+=tcsetattr.3 tcgetattr.3 tcsetattr.3 cfgetispeed.3 \ 8 | tcsetattr.3 cfgetospeed.3 tcsetattr.3 cfmakeraw.3 \ 9 | tcsetattr.3 cfsetispeed.3 tcsetattr.3 cfsetospeed.3 \ 10 | tcsetattr.3 cfsetspeed.3 11 | 12 | .include 13 | -------------------------------------------------------------------------------- /openbsd/lib/libc/termios/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS= cfgetispeed.o cfgetospeed.o cfmakeraw.o cfsetispeed.o cfsetospeed.o \ 2 | cfsetspeed.o tcdrain.o tcflow.o tcflush.o tcgetattr.o tcgetpgrp.o \ 3 | tcsendbreak.o tcsetattr.o tcsetpgrp.o tcgetsid.o 4 | 5 | #OBJECTS+= 6 | 7 | .SUFFIXES: 8 | .DEFAULT: 9 | 10 | all: ${OBJECTS} 11 | 12 | %.o: ${SRCDIR}/termios/%.c 13 | gcc -c ${CFLAGS} -o $@ $< 14 | 15 | testlib: ${OBJECTS} 16 | gcc -shared -e "" -Wl,--disable-auto-import -o testlib.dll ${OBJECTS} 17 | 18 | libtermios.a: ${OBJECTS} 19 | ar cru libtermios.a ${OBJECTS} 20 | 21 | clean: 22 | rm -f *.o *.dll *.a 23 | -------------------------------------------------------------------------------- /openbsd/lib/libc/thread/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=unithread_malloc_lock.o unithread_mutex.o unithread_tag.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/thread/%.c 9 | gcc -c ${CFLAGS} -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/time/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/time/ 2 | 3 | MAN+= ctime.3 strftime.3 time2posix.3 tzfile.5 tzset.3 strptime.3 wcsftime.3 4 | 5 | 6 | MLINKS+=ctime.3 asctime.3 ctime.3 difftime.3 ctime.3 gmtime.3 \ 7 | ctime.3 localtime.3 ctime.3 mktime.3 ctime.3 asctime_r.3 \ 8 | ctime.3 ctime_r.3 ctime.3 gmtime_r.3 ctime.3 localtime_r.3 \ 9 | ctime.3 timelocal.3 ctime.3 timegm.3 10 | MLINKS+=tzset.3 tzsetwall.3 11 | MLINKS+=time2posix.3 posix2time.3 12 | 13 | .include 14 | -------------------------------------------------------------------------------- /openbsd/lib/libc/time/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=asctime.o difftime.o localtime.o strftime.o strptime.o wcsftime.o 2 | 3 | .SUFFIXES: 4 | .DEFAULT: 5 | 6 | all: ${OBJECTS} 7 | 8 | %.o: ${SRCDIR}/time/%.c 9 | gcc -c ${CFLAGS} -I${SRCDIR}/time -o $@ $< 10 | 11 | -------------------------------------------------------------------------------- /openbsd/lib/libc/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/openbsd/lib/libc/version.rc -------------------------------------------------------------------------------- /openbsd/lib/libdl/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Makefile.inc 2 | 3 | RELEASE=6.1.0 4 | 5 | LIBEXEC=${PREFIX}/libexec 6 | 7 | CFLAGS+=-g 8 | OBJECTS=libdl.o 9 | IMPLIB=libdl.dll.a 10 | LDFLAGS=-shared -s 11 | LIBROOT=../../.. 12 | POSIXDIR=${LIBROOT}/libposix 13 | GCCLIB=${LIBROOT}/mingw/gcc 14 | 15 | all: ld.so 16 | 17 | %.o: %.c 18 | gcc -c ${CFLAGS} -I${LIBROOT}/include -I../../include $< 19 | 20 | version.o: version.rc 21 | windres -DVERSION=\\\"${VERSION}\\\" -DRELEASE=\\\"${RELEASE}\\\" $< $@ 22 | 23 | ld.so: ${OBJECTS} version.o 24 | ${LD} ${LDFLAGS} -e _DllMainCRTStartup@12 --out-implib=${IMPLIB} --disable-auto-import --enable-stdcall-fixup \ 25 | -o $@ --image-base=${IMGBASE_LIBD} ${GCCLIB}/crt1.o ${OBJECTS} version.o \ 26 | -L${POSIXDIR} -lposix 27 | 28 | clean: 29 | /bin/rm -f *.o *.a ld.so 30 | 31 | ${LIBEXEC}: 32 | /bin/mkdir ${LIBEXEC} 33 | 34 | install-local: ${LIBEXEC} 35 | /bin/cp ld.so ${LIBEXEC}/ 36 | /bin/cp ${IMPLIB} ${LIBDIR}/ 37 | 38 | install: ${DESTDIR} 39 | ginstall ld.so ${DESTDIR}${LIBEXEC}/ 40 | ginstall ${IMPLIB} ${DESTDIR}${LIBDIR}/libdl.a 41 | 42 | -------------------------------------------------------------------------------- /openbsd/lib/libdl/libdl.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "win/windows.h" 32 | #include "win_posix.h" 33 | #include "vfs_posix.h" 34 | #include "bsd_posix.h" 35 | #include "arch_posix.h" 36 | 37 | extern __import WIN_TASK *__Tasks; 38 | 39 | extern __import DWORD __TlsIndex; 40 | 41 | #include "dlfcn.c" 42 | -------------------------------------------------------------------------------- /openbsd/lib/libdl/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/openbsd/lib/libdl/version.rc -------------------------------------------------------------------------------- /openbsd/lib/libsocket/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Makefile.inc 2 | 3 | RELEASE=75.0 4 | 5 | SRCDIR=/D/openbsd-master/lib 6 | LIBROOT=../../.. 7 | POSIXLIB=${LIBROOT}/libposix 8 | GCCLIB=${LIBROOT}/mingw/gcc 9 | TOOLDIR=${LIBROOT}/mingw/bin 10 | 11 | LDFLAGS= -shared -s 12 | LIBSOCKET= libsocket.so.${RELEASE} 13 | IMPLIB= libsocket.dll.a 14 | 15 | all: objects lib 16 | 17 | lib: ${LIBSOCKET} libsocket.a 18 | 19 | crt1.o: crt1.c 20 | gcc -c -g ${CFLAGS} -I../../include -I${LIBROOT}/include $< 21 | 22 | libsocket.a: 23 | ar cru $@ $(shell ls */*.o) 24 | 25 | version.o: version.rc 26 | windres -DVERSION=\\\"${VERSION}\\\" -DRELEASE=\\\"${RELEASE}\\\" $< $@ 27 | 28 | ${IMPLIB}: libsocket.def 29 | dlltool -d $< -D ${LIBSOCKET} -l $@ 30 | 31 | ${LIBSOCKET}: crt1.o version.o 32 | ${LD} ${LDFLAGS} -e _DllMainCRTStartup@12 --out-implib=${IMPLIB} --disable-auto-import \ 33 | -o $@ crt1.o --image-base=${IMGBASE_LIBSOCKET} $(shell /bin/ls */*.so) version.o \ 34 | -L${POSIXLIB} -L${GCCLIB} -L../libc -lposix -lc -lmsvcrt -lgcc 35 | 36 | %.d: % 37 | @${MAKE} -C $< SRCDIR="${SRCDIR}" CFLAGS="${CFLAGS} -DLIBSOCK_IMPORT= -I../../../../include -I../../libc/include" 38 | 39 | objects: asr.d net.d rpc.d 40 | 41 | clean: objects-clean lib-clean 42 | 43 | lib-clean: 44 | rm -f *.o *.a ${LIBSOCKET} 45 | 46 | objects-clean: 47 | rm -f */*.o */*.so 48 | 49 | install: ${DESTDIR} 50 | ginstall ${LIBSOCKET} ${DESTDIR}${LIBDIR}/ 51 | ginstall libsocket.a ${DESTDIR}${LIBDIR}/ 52 | @#${LN} -s ${LIBSOCKET} ${DESTDIR}${LIBDIR}/libsocket.so 53 | 54 | # Perl needs libsocket.so 55 | install-local: 56 | /bin/cp ${IMPLIB} ${LIBDIR}/ 57 | /bin/cp ${IMPLIB} ${LIBDIR}/libsocket.so 58 | /bin/cp libsocket.a ${LIBDIR}/ 59 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/asr/BSDmakefile: -------------------------------------------------------------------------------- 1 | SRCDIR=/mnt/d/openbsd-master/lib/libc/asr/ 2 | 3 | MAN+= asr_run.3 4 | 5 | MLINKS+= \ 6 | asr_run.3 asr_run_sync.3 \ 7 | asr_run.3 asr_abort.3 \ 8 | asr_run.3 res_send_async.3 \ 9 | asr_run.3 res_query_async.3 \ 10 | asr_run.3 res_search_async.3 \ 11 | asr_run.3 getrrsetbyname_async.3 \ 12 | asr_run.3 gethostbyname_async.3 \ 13 | asr_run.3 gethostbyname2_async.3 \ 14 | asr_run.3 gethostbyaddr_async.3 \ 15 | asr_run.3 getnetbyname_async.3 \ 16 | asr_run.3 getnetbyaddr_async.3 \ 17 | asr_run.3 getaddrinfo_async.3 \ 18 | asr_run.3 getnameinfo_async.3 19 | 20 | .include 21 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/asr/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS= asr.c.o asr_debug.o asr_utils.o \ 2 | getrrsetbyname_async.o \ 3 | gethostnamadr_async.o getnetnamadr_async.o \ 4 | getaddrinfo_async.o getnameinfo_async.o \ 5 | res_send_async.o res_search_async.o res_query.o 6 | OBJECTS+= getaddrinfo.o gethostnamadr.o getnameinfo.o getnetnamadr.o \ 7 | getrrsetbyname.o res_debug.o res_init.c.o res_mkquery.o \ 8 | sethostent.o 9 | 10 | SHOBJECTS= asr.c.so asr_debug.so asr_utils.so \ 11 | getrrsetbyname_async.so \ 12 | gethostnamadr_async.so getnetnamadr_async.so \ 13 | getaddrinfo_async.so getnameinfo_async.so \ 14 | res_send_async.so res_search_async.so res_query.so 15 | SHOBJECTS+= getaddrinfo.so gethostnamadr.so getnameinfo.so getnetnamadr.so \ 16 | getrrsetbyname.so res_debug.so res_init.c.so res_mkquery.so \ 17 | sethostent.so 18 | 19 | all: ${OBJECTS} ${SHOBJECTS} 20 | 21 | %.o: ${SRCDIR}/libc/asr/%.c 22 | gcc -c ${CFLAGS} -DNOPIE -DASR_OPT_HOSTALIASES -o $@ $< 23 | %.c.o: %.c 24 | gcc -c ${CFLAGS} -DNOPIE -I${SRCDIR}/libc/asr -DASR_OPT_HOSTALIASES -o $@ $< 25 | 26 | %.so: ${SRCDIR}/libc/asr/%.c 27 | gcc -c ${CFLAGS} -DASR_OPT_HOSTALIASES -o $@ $< 28 | %.c.so: %.c 29 | gcc -c ${CFLAGS} -I${SRCDIR}/libc/asr -DASR_OPT_HOSTALIASES -o $@ $< 30 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/crt1.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include "win/windows.h" 32 | #include "win_types.h" 33 | #include "vfs_posix.h" 34 | 35 | BOOL WINAPI 36 | DllMainCRTStartup(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) 37 | { 38 | BOOL bResult = TRUE; 39 | 40 | if (fdwReason == DLL_PROCESS_ATTACH){ 41 | bResult = vfs_start(FS_TYPE_WINSOCK); 42 | }else if (fdwReason == DLL_PROCESS_DETACH){ 43 | bResult = vfs_finish(FS_TYPE_WINSOCK); 44 | } 45 | return(bResult); 46 | } 47 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/net/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=base64.o freeaddrinfo.o gai_strerror.o \ 2 | getnetbyaddr.o getnetbyname.o getnetent.o \ 3 | getpeereid.o getproto.o getprotoent.o getprotoname.o \ 4 | getservbyname.o getservbyport.o getifaddrs.o \ 5 | if_nameindex.o inet_addr.o \ 6 | inet_lnaof.o inet_makeaddr.o inet_neta.o inet_netof.o inet_network.o \ 7 | inet_net_ntop.o inet_net_pton.o inet_ntoa.o inet_ntop.o inet_pton.o \ 8 | res_comp.o res_data.o rcmd.o rcmdsh.o rresvport.o \ 9 | res_debug_syms.o ruserok.o \ 10 | res_random.o ethers.o vars6.o 11 | OBJECTS+=getservent.c.o linkaddr.c.o if_indextoname.c.o if_nametoindex.c.o 12 | LIBC= send.o recv.o herror.o 13 | 14 | # IPv6 15 | OBJECTS+=ip6opt.o rthdr.o vars6.o 16 | 17 | SHOBJECTS=base64.so freeaddrinfo.so gai_strerror.so \ 18 | getnetbyaddr.so getnetbyname.so getnetent.so \ 19 | getpeereid.so getproto.so getprotoent.so getprotoname.so \ 20 | getservbyname.so getservbyport.so getifaddrs.so \ 21 | if_nameindex.so inet_addr.so \ 22 | inet_lnaof.so inet_makeaddr.so inet_neta.so inet_netof.so inet_network.so \ 23 | inet_net_ntop.so inet_net_pton.so inet_ntoa.so inet_ntop.so inet_pton.so \ 24 | res_comp.so res_data.so rcmd.so rcmdsh.so rresvport.so \ 25 | res_debug_syms.so ruserok.so \ 26 | res_random.so ethers.so vars6.so 27 | SHOBJECTS+=getservent.c.so linkaddr.c.so if_indextoname.c.so if_nametoindex.c.so 28 | LIBC= send.so recv.so herror.so 29 | 30 | SHOBJECTS+=ip6opt.so rthdr.so vars6.so 31 | 32 | all: ${OBJECTS} ${SHOBJECTS} 33 | 34 | %.o: ${SRCDIR}/libc/net/%.c 35 | gcc -c ${CFLAGS} -DNOPIE -o $@ $< 36 | %.c.o: %.c 37 | gcc -c ${CFLAGS} -DNOPIE -o $@ $< 38 | 39 | %.so: ${SRCDIR}/libc/net/%.c 40 | gcc -c ${CFLAGS} -o $@ $< 41 | %.c.so: %.c 42 | gcc -c ${CFLAGS} -o $@ $< 43 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/net/if_indextoname.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | #include "win/windows.h" 34 | #include "win_types.h" 35 | #include "vfs_posix.h" 36 | #include "arch_posix.h" 37 | 38 | char * 39 | if_indextoname(unsigned int ifindex, char *ifname) 40 | { 41 | char *result = ifname; 42 | 43 | if (!ws2_indextoname(ifindex, ifname)){ 44 | errno = errno_posix(errno_win()); 45 | result = NULL; 46 | } 47 | return(result); 48 | } 49 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/net/if_nametoindex.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2016 Daniel Boland . 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 1. Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * 2. Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * 3. Neither the name of the copyright holders nor the names of its 14 | * contributors may be used to endorse or promote products derived 15 | * from this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS 21 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27 | * THE POSSIBILITY OF SUCH DAMAGE. 28 | * 29 | */ 30 | 31 | #include 32 | 33 | #include "win/windows.h" 34 | #include "win_types.h" 35 | #include "vfs_posix.h" 36 | #include "arch_posix.h" 37 | 38 | unsigned int 39 | if_nametoindex(const char *ifname) 40 | { 41 | unsigned int result = ws2_nametoindex(ifname); 42 | 43 | if (!result){ 44 | errno = errno_posix(errno_win()); 45 | } 46 | return(result); 47 | } 48 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/rpc/Makefile: -------------------------------------------------------------------------------- 1 | OBJECTS=auth_none.o auth_unix.o authunix_prot.o bindresvport.o \ 2 | clnt_generic.o clnt_perror.o clnt_raw.o clnt_simple.o clnt_tcp.o \ 3 | clnt_udp.o rpc_dtablesize.o get_myaddress.o getrpcent.o getrpcport.o \ 4 | pmap_clnt.o pmap_getmaps.o pmap_getport.o pmap_prot.o \ 5 | pmap_prot2.o rpc_prot.o rpc_commondata.o rpc_callmsg.o \ 6 | svc.o svc_auth.o svc_auth_unix.o svc_raw.o svc_run.o svc_simple.o \ 7 | svc_tcp.o svc_udp.o xdr.o xdr_array.o xdr_float.o xdr_mem.o \ 8 | xdr_rec.o xdr_reference.o xdr_stdio.o 9 | #OBJECTS+= pmap_rmt.o 10 | 11 | SHOBJECTS=auth_none.so auth_unix.so authunix_prot.so bindresvport.so \ 12 | clnt_generic.so clnt_perror.so clnt_raw.so clnt_simple.so clnt_tcp.so \ 13 | clnt_udp.so rpc_dtablesize.so get_myaddress.so getrpcent.so getrpcport.so \ 14 | pmap_clnt.so pmap_getmaps.so pmap_getport.so pmap_prot.so \ 15 | pmap_prot2.so rpc_prot.so rpc_commondata.so rpc_callmsg.so \ 16 | svc.so svc_auth.so svc_auth_unix.so svc_raw.so svc_run.so svc_simple.so \ 17 | svc_tcp.so svc_udp.so xdr.so xdr_array.so xdr_float.so xdr_mem.so \ 18 | xdr_rec.so xdr_reference.so xdr_stdio.so 19 | #SHOBJECTS+= pmap_rmt.so 20 | 21 | all: ${OBJECTS} ${SHOBJECTS} 22 | 23 | %.o: ${SRCDIR}/libc/rpc/%.c 24 | gcc -c ${CFLAGS} -DNOPIE -o $@ $< 25 | 26 | %.so: ${SRCDIR}/libc/rpc/%.c 27 | gcc -c ${CFLAGS} -o $@ $< 28 | 29 | -------------------------------------------------------------------------------- /openbsd/lib/libsocket/version.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/openbsd/lib/libsocket/version.rc -------------------------------------------------------------------------------- /openbsd/lib/libutil/Makefile: -------------------------------------------------------------------------------- 1 | include ../../../Makefile.inc 2 | 3 | RELEASE=12.1 4 | 5 | LIBUTIL=libutil.so.${RELEASE} 6 | IMPLIB=libutil.dll.a 7 | 8 | LIBROOT=../../.. 9 | GCCLIB=${LIBROOT}/mingw/gcc 10 | POSIXLIB=${LIBROOT}/libposix 11 | 12 | OBJECTS=bcrypt_pbkdf.o duid.o \ 13 | login_tty.o logout.o logwtmp.o pty.o \ 14 | uucplock.o fparseln.o opendisk.o pidfile.o \ 15 | fmt_scaled.o pkcs5_pbkdf2.o \ 16 | getrawpartition.o readlabel.o opendev.o 17 | OBJECTS+=ohash_create_entry.o ohash_delete.o ohash_do.o ohash_entries.o \ 18 | ohash_enum.o ohash_init.o ohash_interval.o \ 19 | ohash_lookup_interval.o ohash_lookup_memory.o \ 20 | ohash_qlookup.o ohash_qlookupi.o 21 | OBJECTS+= getmaxpartitions.o 22 | # BSD Auth 23 | OBJECTS+=passwd.o check_expire.o login_fbtab.o imsg.o imsg-buffer.o login.o 24 | 25 | HEADERS=util.h imsg.h 26 | 27 | all: libutil.a 28 | 29 | %.o: ${SRCDIR}/lib/libutil/%.c 30 | gcc -c ${CFLAGS} -I../../include -o $@ $< 31 | 32 | pidfile.o: pidfile.c 33 | gcc -c ${CFLAGS} -I../../include -o $@ $< 34 | 35 | libutil.a: ${OBJECTS} 36 | ar cru $@ ${OBJECTS} 37 | 38 | ${LIBUTIL}: ${OBJECTS} 39 | ${LD} -shared -s -o $@ -e _DllMainCRTStartup@12 --disable-auto-import \ 40 | --out-implib=${IMPLIB} ${GCCLIB}/crt1.o ${OBJECTS} \ 41 | -L/lib -L${GCCLIB} -lmsvcrt -lmingw32 -lmingwex -lsocket -lgcc 42 | 43 | clean: 44 | /bin/rm -f *.o *.a ${LIBUTIL} 45 | 46 | %.h: ${SRCDIR}/lib/libutil/%.h 47 | @cp -vu $< ${DESTDIR}${INCDIR}/$@ 48 | 49 | install-local: ${HEADERS} 50 | /bin/cp libutil.a ${LIBDIR}/ 51 | -------------------------------------------------------------------------------- /openbsd/sys/arch/i386/include/disklabel.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/arch/i386/include/disklabel.h,v 1.34 2007/06/20 18:15:45 deraadt Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 1994 Christopher G. Demetriou 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 1. Redistributions of source code must retain the above copyright 11 | * notice, this list of conditions and the following disclaimer. 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 3. All advertising materials mentioning features or use of this software 16 | * must display the following acknowledgement: 17 | * This product includes software developed by Christopher G. Demetriou. 18 | * 4. The name of the author may not be used to endorse or promote products 19 | * derived from this software without specific prior written permission 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 | */ 32 | 33 | #ifndef _MACHINE_DISKLABEL_H_ 34 | #define _MACHINE_DISKLABEL_H_ 35 | 36 | #define LABELSECTOR 1 /* sector containing label */ 37 | #define LABELOFFSET 0 /* offset of label in sector */ 38 | #define MAXPARTITIONS 16 /* number of partitions */ 39 | 40 | #endif /* _MACHINE_DISKLABEL_H_ */ 41 | -------------------------------------------------------------------------------- /openbsd/sys/arch/i386/include/exec.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/arch/i386/include/exec.h,v 1.12 2013/10/17 08:02:16 deraadt Exp $ */ 2 | /* $NetBSD: exec.h,v 1.6 1994/10/27 04:16:05 cgd Exp $ */ 3 | 4 | /* 5 | * Copyright (c) 1993 Christopher G. Demetriou 6 | * All rights reserved. 7 | * 8 | * Redistribution and use in source and binary forms, with or without 9 | * modification, are permitted provided that the following conditions 10 | * are met: 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. Redistributions in binary form must reproduce the above copyright 14 | * notice, this list of conditions and the following disclaimer in the 15 | * documentation and/or other materials provided with the distribution. 16 | * 3. The name of the author may not be used to endorse or promote products 17 | * derived from this software without specific prior written permission 18 | * 19 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 20 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 21 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 22 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | */ 30 | 31 | #ifndef _MACHINE_EXEC_H_ 32 | #define _MACHINE_EXEC_H_ 33 | 34 | #define __LDPGSZ 4096 35 | 36 | #define ARCH_ELFSIZE 32 37 | 38 | #define ELF_TARG_CLASS ELFCLASS32 39 | #define ELF_TARG_DATA ELFDATA2LSB 40 | #define ELF_TARG_MACH EM_386 /* XXX - EM_486 is currently unused 41 | by all OSs/compilers/linkers */ 42 | 43 | #define _KERN_DO_ELF 44 | 45 | #endif /* _MACHINE_EXEC_H_ */ 46 | -------------------------------------------------------------------------------- /openbsd/sys/arch/i386/include/ieeefp.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/arch/i386/include/ieeefp.h,v 1.3 2011/03/23 16:54:35 pirofti Exp $ */ 2 | 3 | /* 4 | * Written by J.T. Conklin, Apr 6, 1995 5 | * Public domain. 6 | */ 7 | 8 | #ifndef _MACHINE_IEEEFP_H_ 9 | #define _MACHINE_IEEEFP_H_ 10 | 11 | typedef int fp_except; 12 | #define FP_X_INV 0x01 /* invalid operation exception */ 13 | #define FP_X_DNML 0x02 /* denormalization exception */ 14 | #define FP_X_DZ 0x04 /* divide-by-zero exception */ 15 | #define FP_X_OFL 0x08 /* overflow exception */ 16 | #define FP_X_UFL 0x10 /* underflow exception */ 17 | #define FP_X_IMP 0x20 /* imprecise (loss of precision) */ 18 | 19 | typedef enum { 20 | FP_RN=0, /* round to nearest representable number */ 21 | FP_RM=1, /* round toward negative infinity */ 22 | FP_RP=2, /* round toward positive infinity */ 23 | FP_RZ=3 /* round to zero (truncate) */ 24 | } fp_rnd; 25 | 26 | #endif /* _MACHINE_IEEEFP_H_ */ 27 | -------------------------------------------------------------------------------- /openbsd/sys/arch/i386/include/pic.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/arch/i386/include/pic.h,v 1.1 2009/08/13 13:24:48 kettenis Exp $ */ 2 | /* $NetBSD: pic.h,v 1.1 2003/02/26 21:26:11 fvdl Exp $ */ 3 | 4 | #ifndef _X86_PIC_H 5 | #define _X86_PIC_H 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | struct cpu_info; 12 | 13 | /* 14 | * Structure common to all PIC softcs 15 | */ 16 | struct pic { 17 | struct device pic_dev; 18 | int pic_type; 19 | #ifdef MULTIPROCESSOR 20 | struct mutex pic_mutex; 21 | #endif 22 | void (*pic_hwmask)(struct pic *, int); 23 | void (*pic_hwunmask)(struct pic *, int); 24 | void (*pic_addroute)(struct pic *, struct cpu_info *, int, int, int); 25 | void (*pic_delroute)(struct pic *, struct cpu_info *, int, int, int); 26 | struct intrstub *pic_level_stubs; 27 | struct intrstub *pic_edge_stubs; 28 | }; 29 | 30 | #define pic_name pic_dev.dv_xname 31 | 32 | /* 33 | * PIC types. 34 | */ 35 | #define PIC_I8259 0 36 | #define PIC_IOAPIC 1 37 | #define PIC_LAPIC 2 38 | #define PIC_SOFT 3 39 | 40 | extern struct pic i8259_pic; 41 | extern struct pic local_pic; 42 | extern struct pic softintr_pic; 43 | #endif 44 | -------------------------------------------------------------------------------- /openbsd/sys/arch/i386/include/setjmp.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/arch/i386/include/setjmp.h,v 1.2 2000/08/05 22:07:32 niklas Exp $ */ 2 | /* $NetBSD: setjmp.h,v 1.1 1994/12/20 10:36:43 cgd Exp $ */ 3 | 4 | /* 5 | * machine/setjmp.h: machine dependent setjmp-related information. 6 | */ 7 | 8 | #define _JBLEN 10 /* size, in longs, of a jmp_buf */ 9 | -------------------------------------------------------------------------------- /openbsd/sys/arch/i386/include/sysarch.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/arch/i386/include/sysarch.h,v 1.12 2012/12/05 23:20:12 deraadt Exp $ */ 2 | /* $NetBSD: sysarch.h,v 1.8 1996/01/08 13:51:44 mycroft Exp $ */ 3 | 4 | #ifndef _MACHINE_SYSARCH_H_ 5 | #define _MACHINE_SYSARCH_H_ 6 | 7 | /* 8 | * Architecture specific syscalls (i386) 9 | */ 10 | #define I386_GET_LDT 0 11 | #define I386_SET_LDT 1 12 | #define I386_IOPL 2 13 | #define I386_GET_IOPERM 3 14 | #define I386_SET_IOPERM 4 15 | #define I386_VM86 5 16 | #define I386_GET_FSBASE 6 17 | #define I386_SET_FSBASE 7 18 | #define I386_GET_GSBASE 8 19 | #define I386_SET_GSBASE 9 20 | 21 | struct i386_get_ldt_args { 22 | int start; 23 | union descriptor *desc; 24 | int num; 25 | }; 26 | 27 | struct i386_set_ldt_args { 28 | int start; 29 | union descriptor *desc; 30 | int num; 31 | }; 32 | 33 | struct i386_iopl_args { 34 | int iopl; 35 | }; 36 | 37 | struct i386_get_ioperm_args { 38 | u_long *iomap; 39 | }; 40 | 41 | struct i386_set_ioperm_args { 42 | u_long *iomap; 43 | }; 44 | 45 | #ifdef _KERNEL 46 | uint32_t i386_get_threadbase(struct proc *, int); 47 | int i386_set_threadbase(struct proc *, uint32_t, int); 48 | #else 49 | 50 | #include 51 | 52 | __BEGIN_DECLS 53 | int i386_get_ldt(int, union descriptor *, int); 54 | int i386_set_ldt(int, union descriptor *, int); 55 | int i386_iopl(int); 56 | int i386_get_ioperm(u_long *); 57 | int i386_set_ioperm(u_long *); 58 | int i386_get_fsbase(void **); 59 | int i386_set_fsbase(void *); 60 | int i386_get_gsbase(void **); 61 | int i386_set_gsbase(void *); 62 | int sysarch(int, void *); 63 | __END_DECLS 64 | #endif 65 | 66 | #endif /* !_MACHINE_SYSARCH_H_ */ 67 | -------------------------------------------------------------------------------- /openbsd/sys/kern/syscalls.conf: -------------------------------------------------------------------------------- 1 | # $OpenBSD: src/sys/kern/syscalls.conf,v 1.20 2013/09/14 01:35:01 guenther Exp $ 2 | # $NetBSD: syscalls.conf,v 1.2 1994/10/26 06:45:57 cgd Exp $ 3 | 4 | sysnames="syscalls.c" 5 | sysnumhdr="../sys/syscall.h" 6 | syssw="init_sysent.c" 7 | sysarghdr="../sys/syscallargs.h" 8 | 9 | # Any additions to the next line for options that are required for the 10 | # (new) kernel to boot an existing userland must be coordinated with 11 | # the snapshot builders 12 | compatopts="" 13 | libcompatopts="" 14 | 15 | switchname="sysent" 16 | namesname="syscallnames" 17 | constprefix="SYS_" 18 | -------------------------------------------------------------------------------- /openbsd/sys/net/if_enc.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/net/if_enc.h,v 1.11 2013/06/25 09:16:34 mpi Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2010 Reyk Floeter 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef _NET_ENC_H 20 | #define _NET_ENC_H 21 | 22 | #define ENCMTU 1536 /* XXX should be bigger, maybe LOMTU */ 23 | #define ENC_HDRLEN 12 24 | 25 | struct enchdr { 26 | u_int32_t af; 27 | u_int32_t spi; 28 | u_int32_t flags; 29 | }; 30 | 31 | #ifdef _KERNEL 32 | struct enc_softc { 33 | struct ifnet sc_if; /* virtual interface */ 34 | u_int sc_unit; 35 | }; 36 | 37 | struct ifnet *enc_getif(u_int, u_int); 38 | #endif /* _KERNEL */ 39 | 40 | #endif /* _NET_ENC_H */ 41 | -------------------------------------------------------------------------------- /openbsd/sys/sys/evcount.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/sys/evcount.h,v 1.3 2010/09/20 06:33:46 matthew Exp $ */ 2 | /* 3 | * Copyright (c) 2004 Artur Grabowski 4 | * Copyright (c) 2004 Aaron Campbell 5 | * All rights reserved. 6 | * 7 | * Redistribution and use in source and binary forms, with or without 8 | * modification, are permitted provided that the following conditions 9 | * are met: 10 | * 11 | * 1. Redistributions of source code must retain the above copyright 12 | * notice, this list of conditions and the following disclaimer. 13 | * 2. The name of the author may not be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, 17 | * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY 18 | * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 19 | * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 | * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | 28 | #ifndef __SYS_EVCOUNT_H__ 29 | #define __SYS_EVCOUNT_H__ 30 | 31 | #ifdef _KERNEL 32 | 33 | #include 34 | 35 | struct evcount { 36 | u_int64_t ec_count; /* main counter */ 37 | int ec_id; /* counter ID */ 38 | const char *ec_name; /* counter name */ 39 | void *ec_data; /* user data */ 40 | 41 | TAILQ_ENTRY(evcount) next; 42 | }; 43 | 44 | void evcount_attach(struct evcount *, const char *, void *); 45 | void evcount_detach(struct evcount *); 46 | int evcount_sysctl(int *, u_int, void *, size_t *, void *, size_t); 47 | 48 | #endif /* _KERNEL */ 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /openbsd/sys/sys/statvfs.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/sys/statvfs.h,v 1.3 2013/03/24 17:45:50 deraadt Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2008 Otto Moerbeek 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef _SYS_STATVFS_H_ 20 | #define _SYS_STATVFS_H_ 21 | 22 | #include 23 | 24 | struct statvfs { 25 | unsigned long f_bsize; /* file system block size */ 26 | unsigned long f_frsize; /* fundamental file system block size */ 27 | fsblkcnt_t f_blocks; /* number of blocks (unit f_frsize) */ 28 | fsblkcnt_t f_bfree; /* free blocks in file system */ 29 | fsblkcnt_t f_bavail; /* free blocks for non-root */ 30 | fsfilcnt_t f_files; /* total file inodes */ 31 | fsfilcnt_t f_ffree; /* free file inodes */ 32 | fsfilcnt_t f_favail; /* free file inodes for to non-root */ 33 | unsigned long f_fsid; /* file system id */ 34 | unsigned long f_flag; /* bit mask of f_flag values */ 35 | unsigned long f_namemax; /* maximum filename length */ 36 | }; 37 | 38 | #define ST_RDONLY 0x0001UL /* read-only filesystem */ 39 | #define ST_NOSUID 0x0002UL /* nosuid flag set */ 40 | 41 | #ifndef _KERNEL 42 | __BEGIN_DECLS 43 | int fstatvfs(int, struct statvfs *); 44 | int statvfs(const char *, struct statvfs *); 45 | __END_DECLS 46 | #endif /* !_KERNEL */ 47 | 48 | #endif /* !_SYS_STATVFS_H_ */ 49 | -------------------------------------------------------------------------------- /openbsd/sys/sys/stdarg.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/sys/stdarg.h,v 1.8 2011/03/02 18:31:58 matthew Exp $ */ 2 | /* 3 | * Copyright (c) 2003, 2004 Marc espie 4 | * 5 | * Permission to use, copy, modify, and distribute this software for any 6 | * purpose with or without fee is hereby granted, provided that the above 7 | * copyright notice and this permission notice appear in all copies. 8 | * 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 | */ 17 | 18 | #ifndef _STDARG_H_ 19 | #define _STDARG_H_ 20 | 21 | #include 22 | 23 | #if (defined(__GNUC__) && __GNUC__ >= 3) || defined(__PCC__) 24 | 25 | /* Define __gnuc_va_list. */ 26 | 27 | #ifndef __GNUC_VA_LIST 28 | #define __GNUC_VA_LIST 29 | typedef __builtin_va_list __gnuc_va_list; 30 | #endif 31 | 32 | /* Note that the type used in va_arg is supposed to match the 33 | actual type **after default promotions**. 34 | Thus, va_arg (..., short) is not valid. */ 35 | 36 | #define va_start(ap, last) __builtin_va_start((ap), last) 37 | #define va_end(ap) __builtin_va_end((ap)) 38 | #define va_arg(ap, type) __builtin_va_arg((ap), type) 39 | #define __va_copy(dst, src) __builtin_va_copy((dst),(src)) 40 | 41 | typedef __gnuc_va_list va_list; 42 | 43 | #else 44 | #include 45 | #endif 46 | 47 | #if __ISO_C_VISIBLE >= 1999 48 | #define va_copy(dst, src) __va_copy((dst), (src)) 49 | #endif 50 | 51 | #endif /* not _STDARG_H_ */ 52 | -------------------------------------------------------------------------------- /openbsd/sys/sys/task.h: -------------------------------------------------------------------------------- 1 | /* $OpenBSD: src/sys/sys/task.h,v 1.5 2013/12/23 04:20:47 dlg Exp $ */ 2 | 3 | /* 4 | * Copyright (c) 2013 David Gwynne 5 | * 6 | * Permission to use, copy, modify, and distribute this software for any 7 | * purpose with or without fee is hereby granted, provided that the above 8 | * copyright notice and this permission notice appear in all copies. 9 | * 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 17 | */ 18 | 19 | #ifndef _SYS_TASKQ_H_ 20 | #define _SYS_TASKQ_H_ 21 | 22 | #include 23 | 24 | struct taskq; 25 | 26 | struct task { 27 | TAILQ_ENTRY(task) t_entry; 28 | void (*t_func)(void *, void *); 29 | void *t_arg1; 30 | void *t_arg2; 31 | unsigned int t_flags; 32 | }; 33 | 34 | #ifdef _KERNEL 35 | extern struct taskq *const systq; 36 | 37 | struct taskq *taskq_create(const char *, unsigned int, int); 38 | void taskq_destroy(struct taskq *); 39 | 40 | void task_set(struct task *, void (*)(void *, void *), 41 | void *, void *); 42 | int task_add(struct taskq *, struct task *); 43 | int task_del(struct taskq *, struct task *); 44 | 45 | #define TASK_INITIALIZER(_f, _a1, _a2) \ 46 | { { NULL, NULL }, (_f), (_a1), (_a2), 0 } 47 | 48 | #endif /* _KERNEL */ 49 | 50 | #endif /* _SYS_TASKQ_H_ */ 51 | -------------------------------------------------------------------------------- /sbin/Makefile: -------------------------------------------------------------------------------- 1 | include ../Makefile.inc 2 | 3 | RELEASE=6.1.0 4 | 5 | LDFLAGS= -s -Wl,--disable-auto-import -Wl,--enable-stdcall-fixup 6 | GCCLIB=/lib/gcc/mingw32/4.8.1 7 | WINLIB=/C/WINDOWS/system32 8 | PROGS=wrc mkent wtrace mount_refs 9 | WINDIR=/C/WINDOWS/system32 10 | TRACELIB=../libtrace/libtrace.a 11 | 12 | .SUFFIXES: 13 | .DEFAULT: 14 | 15 | all: ${PROGS} bsd.exe 16 | 17 | bsd.o: bsd.c 18 | gcc -c -DNOPIE ${CFLAGS} -I../include -I../openbsd/sys -o $@ $< 19 | 20 | %.o: %.c 21 | gcc -c ${CFLAGS} -I../include -I../openbsd/sys -o $@ $< 22 | 23 | %.exe: %.o 24 | gcc ${LDFLAGS} -o $@ $< ${LIBS} 25 | 26 | # 27 | # -Wl,-o inhibits the default --force-exe-suffix. 28 | # 29 | 30 | version.o: bsd.rc 31 | windres -DVERSION=\\\"${VERSION}\\\" -DRELEASE=\\\"${RELEASE}\\\" $< $@ 32 | 33 | mkent: mkent.o 34 | gcc ${LDFLAGS} -o $@ $< ${MINGW}/lib/libiphlpapi.a 35 | 36 | # 37 | # use -mwindows -L${WINDIR} for a Windows app 38 | # 39 | 40 | bsd.exe: bsd.o version.o 41 | gcc -static ${LDFLAGS} -o $@ $^ 42 | 43 | console.exe: console.o libconsole.o 44 | gcc ${LDFLAGS} -L${WINDIR} -o $@ console.o libconsole.o -lutil 45 | 46 | mount_refs: ${SRCDIR}/sbin/mount_ntfs/mount_ntfs.c 47 | gcc -c ${CFLAGS} -I../include -I../openbsd/include -o $@ $< 48 | 49 | wrc: wrc.exe 50 | 51 | libwtrace.o: libwtrace.c 52 | gcc -c ${CFLAGS} -I${MINGW}/include -I../include -I../libtrace -o $@ $< 53 | 54 | wtrace: wtrace.c libwtrace.o ${TRACELIB} 55 | gcc -s ${CFLAGS} ${LDFLAGS} -I../include -o $@ $^ \ 56 | ${MINGW}/lib/libadvapi32.a ${MINGW}/lib/libkernel32.a ${MINGW}/lib/libuser32.a \ 57 | ${MINGW}/lib/libntdll.a 58 | 59 | install-local: 60 | ./mkent passwd >/etc/passwd 61 | ./mkent group >/etc/group 62 | 63 | install-wtrace: 64 | ginstall wtrace ${DESTDIR}${SBINDIR}/ 65 | 66 | install: ${DESTDIR} 67 | @for file in ${PROGS}; do echo $$file; ginstall $$file "${DESTDIR}${SBINDIR}/$$file"; done 68 | ginstall -m 02555 -o 0 -g 0 bsd.exe ${DESTDIR}${SBINDIR}/ 69 | 70 | clean: 71 | /bin/rm -f *.exe *.o 72 | 73 | -------------------------------------------------------------------------------- /sbin/bsd.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dboland/minc/5e636003ff55f72e24a803aa7ff7f0f0e75974c8/sbin/bsd.rc --------------------------------------------------------------------------------