pkgsrc/archivers/hpack/patches/patch-ad
yyamano 307c1dd679 Make it build on Darwin.
* Use curses. Darwin doesn't have termcap.
* Add __APPLE__ to system.h to define necessary macros.
* Replace __{Free,Open,Net}BSD__ with __UNIX__ in language/language.c.
  It worked on *BSD, but not correct logically.

XXX -no-cpp-precomp issue isn't fixed yet. I think we should fix it in
XXX generic way.
2002-03-09 03:27:51 +00:00

33 lines
1.1 KiB
Text

$NetBSD: patch-ad,v 1.2 2002/03/09 03:27:51 yyamano Exp $
--- language/language.c.orig Thu Sep 23 11:23:20 1993
+++ language/language.c
@@ -188,7 +188,7 @@
/* Process user response */
response = hgetch();
response = toupper( response ); /* Damn macros */
- blankLine( screenWidth );
+ blankLine( screenWidth - 1 );
if( response == RESPONSE_QUIT )
return;
lineNo -= ( response == ' ' ) ? screenHeight : 1;
@@ -268,6 +268,9 @@
if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) == ERROR )
return( ERROR );
#elif defined( __UNIX__ )
+ fileNamePtr = getFirstKeyPath( PREFIX "/share/hpack", DATA_FILENAME );
+ if( ( inFD = hopen( fileNamePtr, O_RDONLY | S_DENYWR | A_RANDSEQ ) ) != ERROR )
+ goto found;
/* Build path to language file and try and process it */
fileNamePtr = getFirstKeyPath( getenv( "PATH" ), DATA_FILENAME );
while( fileNamePtr != NULL )
@@ -290,6 +293,9 @@
return( ERROR ); /* Couldn't find/open input file */
}
#endif /* System-specific handling of how to find language defn.file */
+#if defined(__UNIX__)
+found:
+#endif
setInputFD( inFD );
resetFastIn();