Skip to content

Commit

Permalink
Merge pull request #174 from rstudio/libuv-v1.23.1
Browse files Browse the repository at this point in the history
Udpate to libuv 1.23.1
  • Loading branch information
jcheng5 authored Oct 18, 2018
2 parents cb697db + e69f4a9 commit 2cbf7bd
Show file tree
Hide file tree
Showing 208 changed files with 10,354 additions and 6,894 deletions.
2 changes: 1 addition & 1 deletion src/Makevars
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ifeq ($(UNAME), OpenBSD)
PKG_LIBS += -lkvm
endif

PKG_CPPFLAGS = $(C_VISIBILITY) -pthread
PKG_CPPFLAGS = -Ilibuv/include $(C_VISIBILITY) -pthread

# To avoid spurious warnings from `R CMD check --as-cran`, about compiler
# warning flags like -Werror.
Expand Down
2 changes: 1 addition & 1 deletion src/Makevars.win
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CXX_STD=CXX11
PKG_LIBS = ./libuv/libuv.a ./http-parser/http_parser.o ./sha1/sha1.o ./base64/base64.o \
-lpthread -lws2_32 -lkernel32 -lpsapi -liphlpapi -lshell32 -luserenv

PKG_CPPFLAGS += -D_WIN32_WINNT=0x0600 -DSTRICT_R_HEADERS -Wno-deprecated
PKG_CPPFLAGS += -Ilibuv/include -D_WIN32_WINNT=0x0600 -DSTRICT_R_HEADERS -Wno-deprecated

# Additional flags for libuv borrowed from libuv/Makefile.mingw
LIBUV_CFLAGS = -Iinclude -Isrc -Isrc/win -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600
Expand Down
68 changes: 61 additions & 7 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,69 @@ Build notes

## libuv

The contents of the libuv/ directory are the canonical libuv sources, with the following changes.
The contents of the libuv/ directory are the canonical libuv sources, with changes as described below.

****
### Step-by-step instructions

The libuv sources contain unnamed structs, which result in warnings on MinGW's GCC. This in turn causes WARNINGS in R CMD check on Windows. Commit f40b733 converted them to named structs.
To update libuv to a new version, do the following:

*****
* Edit `tools/update_libuv.R` so that `version` is the new version number, then commit.
* Run that script, do a `git add src/libuv`, then commit.

```
tools/update_libuv.R
git add src/libuv
git commit
```
* Cherry-pick some fixes:
```
# Fix for unnamed structs on MinGW
git cherry-pick 327a0a9
# Fix for Solaris
git cherry-pick f7b4ff8
```
* Run libuv's `autogen.sh`, and commit the files.
```
cd src/libuv
./autogen.sh
mv m4/lt~obsolete.m4 m4/lt_obsolete.m4
# Add these generated files. -f is needed because they are listed in src/libuv/.gitignore.
git add -f Makefile.in
git add -f aclocal.m4
git add -f ar-lib
git add -f compile
git add -f config.guess
git add -f config.sub
git add -f configure
git add -f depcomp
git add -f install-sh
git add -f ltmain.sh
git add -f m4/libtool.m4
git add -f m4/libuv-extra-automake-flags.m4
git add -f m4/lt_obsolete.m4
git add -f m4/ltoptions.m4
git add -f m4/ltsugar.m4
git add -f m4/ltversion.m4
git add -f missing
git commit
```
* Update this README to refer to the new cherry-picked commits, then commit.
### Details
#### MinGW and unnamed structs
The libuv sources contain unnamed structs, which result in warnings on MinGW's GCC. This in turn causes WARNINGS in R CMD check on Windows. They were converted to named structs.
#### Solaris support
The Makefile.am file is modified for Solaris support. This is the original line:
Expand All @@ -24,7 +80,7 @@ It has `-DSUNOS_NO_IFADDRS` added to it. See [here](https://github.com/libuv/lib
libuv_la_CFLAGS += -D__EXTENSIONS__ -D_XOPEN_SOURCE=500 -DSUNOS_NO_IFADDRS
```
*****
#### Run `autogen.sh`
After modifying Makefile.am, run `./autogen.sh`. This requires automake and libtool, and generates the `configure` script, along with a number of other related files. These generated files are checked into the repository so that other systems to not need automake and libtool to build libuv.
Expand All @@ -37,8 +93,6 @@ If this is not done, then the `configure` script may generate a Makefile which t
The following generated files are checked into the repository:
```
configure
src/Makevars
src/libuv/Makefile.in
src/libuv/aclocal.m4
src/libuv/ar-lib
Expand Down
1 change: 1 addition & 0 deletions src/libuv/.mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Frank Denis <[email protected]>
Imran Iqbal <[email protected]> <[email protected]>
Isaac Z. Schlueter <[email protected]>
Jason Williams <[email protected]>
Jesse Gorzinski <[email protected]>
Justin Venus <[email protected]> <[email protected]>
Keno Fischer <[email protected]> <[email protected]>
Keno Fischer <[email protected]> <[email protected]>
Expand Down
30 changes: 30 additions & 0 deletions src/libuv/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -321,3 +321,33 @@ Pekka Nikander <[email protected]>
Ed Schouten <[email protected]>
Xu Meng <[email protected]>
Matt Harrison <[email protected]>
Anna Henningsen <[email protected]>
Jérémy Lal <[email protected]>
Ben Wijen <[email protected]>
elephantp <[email protected]>
Felix Yan <[email protected]>
Mason X <[email protected]>
Jesse Gorzinski <[email protected]>
Ryuichi KAWAMATA <[email protected]>
Joyee Cheung <[email protected]>
Michael Kilburn <[email protected]>
Ruslan Bekenev <[email protected]>
Bob Burger <[email protected]>
Thomas Versteeg <[email protected]>
zzzjim <[email protected]>
Alex Arslan <[email protected]>
Kyle Farnung <[email protected]>
ssrlive <[email protected]>
Tobias Nießen <[email protected]>
Björn Linse <[email protected]>
zyxwvu Shi <[email protected]>
Peter Johnson <[email protected]>
Paolo Greppi <[email protected]>
Shelley Vohr <[email protected]>
Ujjwal Sharma <[email protected]>
Michał Kozakiewicz <[email protected]>
Emil Bay <[email protected]>
Jeremiah Senkpiel <[email protected]>
Andy Zhang <[email protected]>
dmabupt <[email protected]>
Ryan Liptak <[email protected]>
Loading

0 comments on commit 2cbf7bd

Please sign in to comment.