File xtexcad-2.4-getcwd.patch of Package texcad
---
FileNom.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- FileNom.c
+++ FileNom.c 2016-08-09 08:23:06.168630914 +0000
@@ -385,6 +385,13 @@ ClassInitialize()
CLASS(selectTranslations) = XtParseTranslationTable(selectTranslations);
}
+#if defined(SYSV) || defined(__linux__)
+ extern char *getcwd();
+#define getwd(buf) getcwd(buf,MAXPATHLEN)
+#else
+ extern char *getwd();
+#endif
+
/* ARGSUSED */
static void
Initialize(req, new, args, num_args)
@@ -399,13 +406,6 @@ Initialize(req, new, args, num_args)
String dir, menuList, p, q;
Dimension width, height;
-#ifdef SYSV
- extern char *getcwd();
-#define getwd(buf) getcwd(buf,MAXPATHLEN)
-#else
- extern char *getwd();
-#endif
-
List(new) = NULL;
Nomination(new).directoryPart = NULL;
Nomination(new).filenamePart = NULL;