On Wed, 2016-12-07 at 15:08 +0100, Samuel Thibault wrote: > Svante Signell, on Wed 07 Dec 2016 14:52:35 +0100, wrote: > > Since go does not have a preprocessor allowing conditional code paths this > > is > > how it should be done (and as I did): > > http://blog.ralch.com/tutorial/golang-conditional-compilation/ > > Ok, but then I'd say move the function which change to a separate file, > so that the other functions are kept shared. > Otherwise it'll be tedious to maintain.
One problem is the file go/syscall/libcall_posix-1.go, derived from go/syscall/libcall_posix.go but _removing_ four function definitions: mount, madvise, mlockall and munlockall. A possible solution would then be to rename that file to libcall_posix_gnu.go. The file libcall_gnu.go name is already used.