1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-24 00:45:52 +00:00

Drop support for checking objformat, and default to elf, not a.out.

This commit is contained in:
Kris Kennaway 2007-01-30 20:23:33 +00:00
parent d68c424370
commit b0c4e070bd
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=183729
2 changed files with 36 additions and 0 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= imake
PORTVERSION= 6.9.0
PORTREVISION= 1
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_XORG}
MASTER_SITE_SUBDIR= X11R${PORTVERSION}/src

View File

@ -0,0 +1,35 @@
--- imake/imake.c.orig Tue Jan 30 14:57:37 2007
+++ imake/imake.c Tue Jan 30 14:55:59 2007
@@ -1153,29 +1153,17 @@
int mib[2];
size_t len;
int osrel = 0;
- FILE *objprog = NULL;
int iself = 0;
- char buf[10];
- char cmd[PATH_MAX];
mib[0] = CTL_KERN;
mib[1] = KERN_OSRELDATE;
len = sizeof(osrel);
sysctl(mib, 2, &osrel, &len, NULL, 0);
- if (CrossCompiling) {
- strcpy (cmd, CrossCompileDir);
- strcat (cmd, "/");
- strcat (cmd,"objformat");
- } else
- strcpy (cmd, "objformat");
- if (osrel >= 300004 &&
- (objprog = popen(cmd, "r")) != NULL &&
- fgets(buf, sizeof(buf), objprog) != NULL &&
- strncmp(buf, "elf", 3) == 0)
+ if (osrel < 300004)
+ iself = 0;
+ else
iself = 1;
- if (objprog)
- pclose(objprog);
fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
}