[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DJGPP support for bison
From: |
Juan Manuel Guerrero |
Subject: |
Re: DJGPP support for bison |
Date: |
Wed, 13 Feb 2002 14:55:44 +0100 |
On 11 Feb 2002 14:38:34 +0100, Akim Demaille wrote:
> Juan> savannah id : juan_g
>
> Done, please, proceed. I'd appreciate if you could also update the
> NEWS file. Pay attention to work on the BRANCH_1-30 or so (I don't
> remember its exact name).
Please, can someone tell me which is the appropiate branch to commit
my patch?
Please note that I am new to cvs.
I have checked out BISON-1_33 branch to create the patch below using
cvs command: co -r BISON-1_33 bison. Now I get the following errors:
cvs server: sticky tag `BISON-1_33' for file `bison/ChangeLog' is not a branch
cvs server: sticky tag `BISON-1_33' for file `bison/NEWS' is not a branch
cvs server: sticky tag `BISON-1_33' for file `bison/doc/bison.texinfo' is not a
branch
cvs server: sticky tag `BISON-1_33' for file `bison/src/files.c' is not a branch
cvs server: sticky tag `BISON-1_33' for file `bison/src/getargs.c' is not a
branch
cvs server: sticky tag `BISON-1_33' for file `bison/src/system.h' is not a
branch
when I try to commit my changes. I have read cvs.info docs about sticky tags
but I prefer not to experiment with the CVS tree.
A clear instruction what branch shall be checked out to apply the changes
will be greatly appreciated.
TIA,
Guerrero, Juan Manuel
Index: bison/ChangeLog
===================================================================
RCS file: /cvsroot/bison/bison/ChangeLog,v
retrieving revision 1.173.2.276
diff -u -r1.173.2.276 ChangeLog
--- bison/ChangeLog 7 Feb 2002 17:39:55 -0000 1.173.2.276
+++ bison/ChangeLog 13 Feb 2002 12:52:07 -0000
@@ -1,3 +1,32 @@
+2002-02-13 Guerrero, Juan Manuel <address@hidden>
+
+ * doc/bison.texinfo: Add DJGPP specific information about
+ file name extensions used on different file systems.
+
+ * src/files.c (output_files): MSDOS conditional removed.
+ New macro EXT_TYPE will provide at runtime the appropiate
+ output file extension.
+ (skeleton_find) [MSDOS]: __DJGPP__ conditional added to
+ inhibit the use of DOSish code. POSIX like behaviour.
+
+ * src/getargs.c [AS_FILE_NAME]: __DJGPP__ conditional added.
+ Check at runtime if LFN-API (case preserving) is available or not.
+ Do not unconditionly convert upper case strings in lower case strings.
+
+ * src/system.h [MSDOS] [__GO32__]: __DJGPP__ conditional added.
+ __GO32__ is obsolete and its use is deprecated.
+ [MSDOS]: __DJGPP__ conditional added. Use pathconf
+ to choose POSIX or DOS file extensions at run time.
+ [MSDOS] [__DJGPP__]: New macro EXT_TYPE. If LFN-API is
+ available, the src or header file extension (.c or .h) will be
+ added to the output file name. If no LFN-API is available no src
+ or header file extension will be added to the output file name.
+ [MSDOS] [!__DJGPP__]: New macro EXT_TYPE. Src file and header
+ file extension will never be added to the output file name.
+ [!MSDOS]: New macro EXT_TYPE. Src file and header file
+ extensions will always be added to the output file name.
+
+
2002-02-07 Akim Demaille <address@hidden>
Version 1.33.
Index: bison/NEWS
===================================================================
RCS file: /cvsroot/bison/bison/NEWS,v
retrieving revision 1.21.2.55
diff -u -r1.21.2.55 NEWS
--- bison/NEWS 7 Feb 2002 17:39:55 -0000 1.21.2.55
+++ bison/NEWS 13 Feb 2002 12:52:07 -0000
@@ -9,6 +9,8 @@
* Catch invalid @n
As is done with $n.
+
+* DJGPP support added
Changes in version 1.32, 2002-01-23:
Index: bison/doc/bison.texinfo
===================================================================
RCS file: /cvsroot/bison/bison/doc/bison.texinfo,v
retrieving revision 1.37.2.14
diff -u -r1.37.2.14 bison.texinfo
--- bison/doc/bison.texinfo 5 Jan 2002 01:18:26 -0000 1.37.2.14
+++ bison/doc/bison.texinfo 13 Feb 2002 12:52:09 -0000
@@ -304,6 +304,8 @@
* Bison Options:: All the options described in detail,
in alphabetical order by short options.
* Option Cross Key:: Alphabetical list of long options.
+* Extension Limitations Under DOS:: Bison output files extension differences
+ depending on the DOS/Windows file
system flavour used.
* VMS Invocation:: Bison command syntax on VMS.
Copying This Manual
@@ -5047,6 +5049,8 @@
in alphabetical order by short options.
* Environment Variables:: Variables which affect Bison execution.
* Option Cross Key:: Alphabetical list of long options.
+* Extension Limitations Under DOS:: Bison output files extension differences
+ depending on the DOS/Windows file
system flavour used.
* VMS Invocation:: Bison command syntax on VMS.
@end menu
@@ -5243,6 +5247,39 @@
--version -V
@end example
@end ifinfo
+
address@hidden Extension Limitations Under DOS
address@hidden Extension Limitations under DOS
address@hidden extension limitations under DOS
address@hidden DOS
+
+On DOS/Windows 9X systems the file name extensions of the output files,
+like @file{.tab.c}, that may be used depend on the file system in use.
+The plain DOS file system has limited file name length, does not allow
+the use of a set of certain illicit characters and does not allow more
+than a single dot in the file name.
+
+The DJGPP port of @code{bison} will detect at runtime if (LFN) long file name
+support is available or not. LFN support will be available in a DOS session
+under Windows 9X and successors. Windows NT 4.0 needs a special LFN driver
+(@file(ntlfn08b.zip) or later available at any simtelnet mirror in the /v2misc
+dir) for proper LFN support in a DOS session. If LFN support is available the
+DJGPP port of @code{bison} will use the standard POSIX file name extensions
+of the output files. If LFN support is not available, then the DJGPP port
+of @code{bison} will use DOS specific file name extensions.
+
address@hidden This table summarizes the used extensions:
+
address@hidden @columnfractions 0.1 0.45 0.45
address@hidden @tab LFN extension (Win9X) @tab SFN extension (plain DOS)
address@hidden @tab @file{.tab.c} @tab @file{_tab.c}
address@hidden @tab @file{.tab.h} @tab @file{_tab.h}
address@hidden @tab @file{.tab.cpp} @tab @file{_tab.cpp}
address@hidden @tab @file{.tab.hpp} @tab @file{_tab.hpp}
address@hidden @tab @file{.output} @tab @file{.out}
address@hidden @tab @file{.stype.h} @tab @file{.sth}
address@hidden @tab @file{.guard.c} @tab @file{.guc}
address@hidden multitable
@node VMS Invocation
@section Invoking Bison under VMS
Index: bison/src/files.c
===================================================================
RCS file: /cvsroot/bison/bison/src/files.c,v
retrieving revision 1.51.2.18
diff -u -r1.51.2.18 files.c
--- bison/src/files.c 21 Jan 2002 15:48:25 -0000 1.51.2.18
+++ bison/src/files.c 13 Feb 2002 12:52:09 -0000
@@ -214,7 +214,7 @@
{
const char *res = getenv (envvar);
-#if defined (MSDOS) || defined (_WIN32)
+#if (defined (MSDOS) && !defined(__DJGPP__)) || defined (_WIN32)
const char *cp = getenv ("INIT");
if (!res)
{
@@ -249,7 +249,7 @@
strcpy (res + (cp - program_name), skel_name);
}
}
-#endif /* defined (MSDOS) || defined (_WIN32) */
+#endif /* (defined (MSDOS) && !defined (__DJGPP__)) || defined (_WIN32) */
if (!res)
res = skeleton_name;
@@ -452,9 +452,7 @@
spec_verbose_file = stringappend (short_base_name, EXT_OUTPUT);
attrsfile = stringappend (short_base_name, EXT_STYPE_H);
-#ifndef MSDOS
- attrsfile = stringappend (attrsfile, header_extension);
-#endif /* MSDOS */
+ attrsfile = stringappend (attrsfile, EXT_TYPE (header_extension));
}
@@ -523,9 +521,7 @@
obstack_save (&attrs_obstack, attrsfile);
obstack_free (&attrs_obstack, NULL);
temp_name = stringappend (short_base_name, EXT_GUARD_C);
-#ifndef MSDOS
- temp_name = stringappend (temp_name, src_extension);
-#endif /* MSDOS */
+ temp_name = stringappend (temp_name, EXT_TYPE (src_extension));
obstack_save (&guard_obstack, temp_name);
obstack_free (&guard_obstack, NULL);
}
Index: bison/src/getargs.c
===================================================================
RCS file: /cvsroot/bison/bison/src/getargs.c,v
retrieving revision 1.24.2.7
diff -u -r1.24.2.7 getargs.c
--- bison/src/getargs.c 23 Jan 2002 13:14:56 -0000 1.24.2.7
+++ bison/src/getargs.c 13 Feb 2002 12:52:10 -0000
@@ -160,10 +160,15 @@
| Process the options. |
`----------------------*/
-/* Under DOS, there is no difference on the case. This can be
+/* Under plain DOS, there is no difference on the case. This can be
troublesome when looking for `.tab' etc. */
#ifdef MSDOS
-# define AS_FILE_NAME(File) (strlwr (File), (File))
+# if defined (__DJGPP__)
+/* Windows 9X and successors are case sensitive. */
+# define AS_FILE_NAME(File) ((pathconf ((File), _PC_NAME_MAX) > 12) ? (File)
: (strlwr (File), (File)))
+# else
+# define AS_FILE_NAME(File) (strlwr (File), (File))
+# endif
#else
# define AS_FILE_NAME(File) (File)
#endif
Index: bison/src/system.h
===================================================================
RCS file: /cvsroot/bison/bison/src/system.h,v
retrieving revision 1.23.2.12
diff -u -r1.23.2.12 system.h
--- bison/src/system.h 20 Jan 2002 10:59:44 -0000 1.23.2.12
+++ bison/src/system.h 13 Feb 2002 12:52:10 -0000
@@ -239,7 +239,7 @@
# define MINSHORT -32768
#endif
-#if defined (MSDOS) && !defined (__GO32__)
+#if defined (MSDOS) && !defined (__GO32__) && !defined (__DJGPP__)
# define BITS_PER_WORD 16
# define MAXTABLE 16383
#else
@@ -261,19 +261,31 @@
# define EXT_OUTPUT ".output"
# define EXT_STYPE_H "_stype"
# define EXT_GUARD_C "_guard"
+# define EXT_TYPE(ext) (ext)
#else /* ! VMS */
# ifdef MSDOS
- /* MS DOS. */
-# define EXT_TAB "_tab"
-# define EXT_OUTPUT ".out"
-# define EXT_STYPE_H ".sth"
-# define EXT_GUARD_C ".guc"
+# if defined (__DJGPP__)
+ /* DJGPP */
+# define EXT_TAB ((pathconf (NULL, _PC_NAME_MAX) > 12) ? ".tab"
: "_tab")
+# define EXT_OUTPUT ((pathconf (NULL, _PC_NAME_MAX) > 12) ?
".output" : ".out")
+# define EXT_STYPE_H ((pathconf (NULL, _PC_NAME_MAX) > 12) ?
".stype" : ".sth")
+# define EXT_GUARD_C ((pathconf (NULL, _PC_NAME_MAX) > 12) ?
".guard" : ".guc")
+# define EXT_TYPE(ext) ((pathconf (NULL, _PC_NAME_MAX) > 12) ? (ext)
: "")
+# else /* ! __DJGPP__ */
+ /* MS DOS. */
+# define EXT_TAB "_tab"
+# define EXT_OUTPUT ".out"
+# define EXT_STYPE_H ".sth"
+# define EXT_GUARD_C ".guc"
+# define EXT_TYPE(ext) ""
+# endif
# else /* ! MSDOS */
/* Standard. */
# define EXT_TAB ".tab"
# define EXT_OUTPUT ".output"
# define EXT_STYPE_H ".stype"
# define EXT_GUARD_C ".guard"
+# define EXT_TYPE(ext) (ext)
# endif /* ! MSDOS */
#endif /* ! VMS */