idunham/libdrpc
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master
Could not load branches
Nothing to show
Could not load tags
Nothing to show
{{ refName }}
default
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code
-
Clone
Use Git or checkout with SVN using the web URL.
Work fast with our official CLI. Learn more about the CLI.
- Open with GitHub Desktop
- Download ZIP
Sign In Required
Please sign in to use Codespaces.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching GitHub Desktop
If nothing happens, download GitHub Desktop and try again.
Launching Xcode
If nothing happens, download Xcode and try again.
Launching Visual Studio Code
Your codespace will open once ready.
There was a problem preparing your codespace, please try again.
Latest commit
Git stats
Files
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
=== libdrpc === What is it? This is a port of Android librpc to more regular libc versions (should build with musl, uclibc, or (e)glibc; klibc and dietlibc might work). It needs <linux/poll.h> for POLLRDHUP; at this point musl does not define this macro under any condition, and Android <poll.h> uses <linux/poll.h>. partwake.c, which is not built, contains partial wakelock support. If you want this, you will need to port libpower. Why? The standard solution for RPC outside libc, libtirpc, really isn't: it expects several headers in rpcsvc/ that it doesn't provide, and needs NIS. The build system is enough of a maze that it was faster to port librpc from Android than to fish the proper code out of glibc and patch it into libtirpc. I could probably have used OpenBSD's xdr/, yp/, and rpc/ source (from /usr/src/lib/libc) instead, but this was faster to get and I knew it would work on Linux. If someone ports OpenBSD's RPC implementation, I'll deprecate this. How can I use this? It's Apache licensed, so just about however you want. This does have one limitation inherited from Android: only one outstanding RPC request is permitted at one time. To build all libraries with gcc, type "make CC=gcc". (CC defaults to musl-gcc) libdrpc.a and libdrpc.so are the targets to use for building static and shared libraries. Installation targets are install, insthdr (installs the headers), inst-sh (installs shared libraries), and inst-static (installs libdrpc.a). Default values for variables that affect compilation and installation: CC=musl-gcc CFLAGS+=-D_BSD_SOURCE -D_XOPEN_SOURCE=600 -I. -I./rpc -DRPC_OFFSET=0 PREFIX?=/usr/local INCDIR?=${PREFIX}/include/drpc LIBDIR?=${PREFIX}/lib SYSLIBDIR?=${LIBDIR} If you use the default install directories, you will need these changes: CPPFLAGS+= -I/usr/local/include/drpc LDFLAGS += -L/usr/local/lib -ldrpc How can I help? -If you add new functions, please add them to new source files. The existing structure bloats statically linked binaries. (LTO may be able to partially make up for this, but optimizing for LTO is self-defeating) -If you want to adjust the makefile, please respect the .POSIX: rule! I'm aiming for a Makefile that could be used with any POSIX-compatible make. -Patches welcome, as long as there's a reason for them. -Yes, splitting up the source code for better behavior when static linking is desirable. Just remember the copyright headers. -Make sure changes are under a license compatible with the Apache license: permissive with no advertising clause.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published