diff options
author | Matthieu Herrb <matthieu@herrb.eu> | 2016-09-04 21:55:37 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2016-09-04 21:55:37 +0100 |
commit | 996840a429d3c9c7585b96713d64de70ce745ad2 (patch) | |
tree | 0c2c4466dbb7f4d778689ff8e6e09c0328537082 | |
parent | 69a28d6771241b82dd4e2a9c78e838682562a03c (diff) |
Remove the structure of function pointers used by the dynamic loader
-rw-r--r-- | greeter/greet.c | 3 | ||||
-rw-r--r-- | include/greet.h | 49 | ||||
-rw-r--r-- | xenodm/session.c | 29 |
3 files changed, 4 insertions, 77 deletions
diff --git a/greeter/greet.c b/greeter/greet.c index 5665d89..7f6a47f 100644 --- a/greeter/greet.c +++ b/greeter/greet.c @@ -299,8 +299,7 @@ greet_user_rtn GreetUser( struct display *d, Display ** dpy, struct verify_info *verify, - struct greet_info *greet, - struct dlfuncs *dlfuncs) + struct greet_info *greet) { int i; Arg arglist[2]; diff --git a/include/greet.h b/include/greet.h index 1356c02..2fe4c37 100644 --- a/include/greet.h +++ b/include/greet.h @@ -33,51 +33,6 @@ from The Open Group. #include <X11/Xlib.h> /* - * Do this rather than break a build over a const-mismatch - */ -#if defined(__linux__) || defined(CSRG_BASED) || (defined(sun) && defined(SVR4)) -# define CRYPT_ARGS const char *s1, const char *s2 -# define GETSPNAM_ARGS const char *name -# define GETPWNAM_ARGS const char *name -#else -# define CRYPT_ARGS /*unknown*/ -# define GETSPNAM_ARGS /*unknown*/ -# define GETPWNAM_ARGS /*unknown*/ -#endif - -#if defined(__FreeBSD__) || defined(__bsdi__) || defined(__osf__) -# define SETGRENT_TYPE int -#else -# define SETGRENT_TYPE void -#endif - -struct dlfuncs { - void (*_Debug)(const char * fmt, ...); - void (*_RegisterCloseOnFork)(int fd); - void (*_SecureDisplay)(struct display *d, Display *dpy); - void (*_UnsecureDisplay)(struct display *d, Display *dpy); - void (*_ClearCloseOnFork)(int fd); - void (*_SetupDisplay)(struct display *d); - void (*_LogError)(const char * fmt, ...); - void (*_SessionExit)(struct display *d, int status, int removeAuth); - void (*_DeleteXloginResources)(struct display *d, Display *dpy); - int (*_source)(char **environ, char *file); - char **(*_defaultEnv)(void); - char **(*_setEnv)(char **e, const char *name, const char *value); - char **(*_putEnv)(const char *string, char **env); - char **(*_parseArgs)(char **argv, const char *string); - void (*_printEnv)(char **e); - char **(*_systemEnv)(struct display *d, char *user, char *home); - void (*_LogOutOfMem)(const char * fmt, ...); - SETGRENT_TYPE (*_setgrent)(void); /* no longer used */ - struct group *(*_getgrent)(void); /* no longer used */ - void (*_endgrent)(void); /* no longer used */ - struct passwd *(*_getpwnam)(GETPWNAM_ARGS); - void (*_endpwent)(void); - char *(*_crypt)(CRYPT_ARGS); -}; - -/* * Return values for GreetUser(); * Values must be explictly defined because the greet library * may come from a different vendor. @@ -108,8 +63,8 @@ typedef enum { */ extern greet_user_rtn GreetUser(struct display *, Display **, - struct verify_info *, struct greet_info *, struct dlfuncs *); + struct verify_info *, struct greet_info *); typedef greet_user_rtn (*GreetUserProc)(struct display *, Display **, - struct verify_info *, struct greet_info *, struct dlfuncs *dlfcns); + struct verify_info *, struct greet_info *); diff --git a/xenodm/session.c b/xenodm/session.c index 9eda414..86565d7 100644 --- a/xenodm/session.c +++ b/xenodm/session.c @@ -58,33 +58,6 @@ static int runAndWait (char **args, char **environ); #include <pwd.h> #include <unistd.h> - -static struct dlfuncs dlfuncs = { - Debug, - RegisterCloseOnFork, - SecureDisplay, - UnsecureDisplay, - ClearCloseOnFork, - SetupDisplay, - LogError, - SessionExit, - DeleteXloginResources, - source, - defaultEnv, - setEnv, - putEnv, - parseArgs, - printEnv, - systemEnv, - LogOutOfMem, - setgrent, - getgrent, - endgrent, - getpwnam, - endpwent, - crypt, - }; - static Bool StartClient( struct verify_info *verify, struct display *d, @@ -194,7 +167,7 @@ ManageSession (struct display *d) greet_user_proc = GreetUser; - greet_stat = (*greet_user_proc)(d, &dpy, &verify, &greet, &dlfuncs); + greet_stat = (*greet_user_proc)(d, &dpy, &verify, &greet); if (greet_stat == Greet_Success) { clientPid = 0; |