syscall and smbwrapper on AIX

Tim Potter Tim.Potter at anu.edu.au
Thu Aug 12 03:45:51 GMT 1999


[BTW, the address in the from header, pgmr at marvin.megadodo.umb,
doesn't work]

Kenneth Stephen writes:

> 	Faced with the desperate need to get smbwrapper running on AIX, I
> made an attempt to port it. I stopped when I realized that the syscall
> interface required by the code (realcalls.*) was just not present on AIX.
> All the AIX experts that I asked (I work at IBM Austin, and I was able to
> ask the AIX architects) said that there is no 'syscall' call on AIX that
> will provide a mapping to the various system calls.

[...]

> .. and then later in the file, do a #ifdef NO_SYSCALL to introduce code
> that is specific to AIX. This would map the real_* macros to the actual
> system call invocation.

This is a good way to do it if you can keep it all within realcalls.h
using preprocessor trickery.  You may need to avoid some of the #error
No xyz() wrapper lines.

> 	Not having done any porting before, I dont have a clue as to
> whether I am being supremely stupid or not. Can someone advise me if I am
> on the right track?

I think you're on the right track.  The basic idea is to ensure every
wrapped function has a #define real_xyz macro declared for it somehow.
The code in realcalls.h assumes you have either syscall access or weak
aliases (_xyz or __xyz external symbols) in your C library.  You may
want to check this by hand using nm on your C library in case the
configure script has failed to pick it up somehow.


Tim.

-- 
Tim Potter, System Admin/Programmer              "Disco Stu doesn't advertise"
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602


More information about the samba-technical mailing list