rstudio / httpuv

HTTP and WebSocket server package for R
Other
227 stars 86 forks source link

Use `AppExecLinkReparseBuffer` by name #335

Closed schloerke closed 2 years ago

schloerke commented 2 years ago

Prior art https://github.com/rstudio/httpuv/commit/3e2621d107a647b2781ed6b997e855180d058a0a Related breaking change: https://github.com/rstudio/httpuv/commit/ca370b4aff2578d3f8e8d9146b759e07d32ded0f#diff-63d59b2613aaf4f6bc6608efa6cc2b09395f3e6fbdb125996a1518f296f8d951R404-R408

Error seen:

  OE> C:/rtools40/mingw32/bin/gcc  -O2 -Wall  -std=gnu99 -mfpmath=sse -msse2 -mstackrealign  -Wall -pedantic -Iinclude -Isrc -Isrc/win -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0600   -c -o src/win/fs.o src/win/fs.c
  OE> src/win/fs.c: In function 'fs__readlink_handle':
  OE> src/win/fs.c:404:21: error: 'REPARSE_DATA_BUFFER' {aka 'struct _REPARSE_DATA_BUFFER'} has no member named 'AppExecLinkReparseBuffer'
  OE>      if (reparse_data->AppExecLinkReparseBuffer.StringCount < 3) {
  OE>                      ^~
  OE> src/win/fs.c:408:28: error: 'REPARSE_DATA_BUFFER' {aka 'struct _REPARSE_DATA_BUFFER'} has no member named 'AppExecLinkReparseBuffer'
  OE>      w_target = reparse_data->AppExecLinkReparseBuffer.StringList;
  OE>                             ^~
  OE> make[1]: *** [Makefile-libuv.mingw:26: src/win/fs.o] Error 1
  OE> make[1]: Leaving directory '/c/Users/runneradmin/AppData/Local/Temp/Rtmp8YsjfN/R.INSTALL17083f8f2a9f/httpuv/src-i386/libuv'
  OE> make: *** [Makevars.win:22: libuv/libuv.a] Error 2
  OE> ERROR: compilation failed for package 'httpuv'
  OE> * removing 'C:/Users/RUNNER~1/AppData/Local/Temp/Rtmp48RRag/pkg-lib155424732a9a/httpuv'

SymbolicLinkReparseBuffer, MountPointReparseBuffer, and GenericReparseBuffer look correct.

Only AppExecLinkReparseBuffer was missing.

wch commented 2 years ago

Can you also update src/README.md?

It would be nice to be able to combine this commit with the prior one, so that only a single git cherry-pick is needed, but that might have to be saved for a future revision.

schloerke commented 2 years ago

I am going to merge as this fixes the windows installation issues

schloerke commented 2 years ago

(Performing standard merge to allow for cherry pick commits to exist after merge. Don't know if squash merge would allow for the commits to exist.)