mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
057cb35c45
from the MySQL 5.5 source tree. This change adds the spec file for these ULN RPMs as well as several patches and additional sources, to be used only in ULN RPMs. All these files are in a new directory "SPECIFIC-ULN/". This commit is for internal tool tests only, not yet ready for publishing.
32 lines
720 B
C
32 lines
720 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
#include <unistd.h>
|
|
|
|
/* Translate call of myself into call of same-named script in LIBDIR */
|
|
/* The macro LIBDIR must be defined as a double-quoted string */
|
|
|
|
int main (int argc, char **argv)
|
|
{
|
|
char *basename;
|
|
char *fullname;
|
|
char **newargs;
|
|
int i;
|
|
|
|
basename = strrchr(argv[0], '/');
|
|
if (basename)
|
|
basename++;
|
|
else
|
|
basename = argv[0];
|
|
fullname = malloc(strlen(LIBDIR) + strlen(basename) + 2);
|
|
sprintf(fullname, "%s/%s", LIBDIR, basename);
|
|
newargs = malloc((argc+1) * sizeof(char *));
|
|
newargs[0] = fullname;
|
|
for (i = 1; i < argc; i++)
|
|
newargs[i] = argv[i];
|
|
newargs[argc] = NULL;
|
|
|
|
execvp(fullname, newargs);
|
|
|
|
return 1;
|
|
}
|