updated structure packing pragmas

This commit is contained in:
hyung-hwan 2022-06-10 02:31:20 +00:00
parent 771657468c
commit 4de6b5dc52
4 changed files with 10 additions and 12 deletions

View File

@ -544,8 +544,8 @@ static void print_usage (FILE* out, const hawk_bch_t* argv0)
fprintf (out, " --console-encoding string specify console encoding name\n"); fprintf (out, " --console-encoding string specify console encoding name\n");
#endif #endif
fprintf (out, " --includedirs specify directories to look for module files in\n"); fprintf (out, " --includedirs specify directories to look for includes files in\n");
fprintf (out, " --modlibdirs specify directories to look for include files in\n"); fprintf (out, " --modlibdirs specify directories to look for module files in\n");
fprintf (out, " --modern run in the modern mode(default)\n"); fprintf (out, " --modern run in the modern mode(default)\n");
fprintf (out, " --classic run in the classic mode\n"); fprintf (out, " --classic run in the classic mode\n");
@ -667,9 +667,7 @@ static int process_argv (int argc, hawk_bch_t* argv[], struct arg_t* arg)
{ ":script-encoding", '\0' }, { ":script-encoding", '\0' },
{ ":console-encoding", '\0' }, { ":console-encoding", '\0' },
#if 0
{ ":includedirs", '\0' }, { ":includedirs", '\0' },
#endif
{ ":modlibdirs", '\0' }, { ":modlibdirs", '\0' },
{ "modern", '\0' }, { "modern", '\0' },
@ -875,12 +873,10 @@ static int process_argv (int argc, hawk_bch_t* argv[], struct arg_t* arg)
{ {
arg->classic = 1; arg->classic = 1;
} }
#if 0
else if (hawk_comp_bcstr(opt.lngopt, "includedirs", 0) == 0) else if (hawk_comp_bcstr(opt.lngopt, "includedirs", 0) == 0)
{ {
arg->includedirs = opt.arg; arg->includedirs = opt.arg;
} }
#endif
else if (hawk_comp_bcstr(opt.lngopt, "modlibdirs", 0) == 0) else if (hawk_comp_bcstr(opt.lngopt, "modlibdirs", 0) == 0)
{ {
arg->modlibdirs = opt.arg; arg->modlibdirs = opt.arg;
@ -1192,7 +1188,6 @@ static HAWK_INLINE int execute_hawk (int argc, hawk_bch_t* argv[])
hawk_setopt (hawk, HAWK_OPT_DEPTH_INCLUDE, &tmp); hawk_setopt (hawk, HAWK_OPT_DEPTH_INCLUDE, &tmp);
} }
#if 0
if (arg.includedirs) if (arg.includedirs)
{ {
#if defined(HAWK_OOCH_IS_UCH) #if defined(HAWK_OOCH_IS_UCH)
@ -1210,7 +1205,6 @@ static HAWK_INLINE int execute_hawk (int argc, hawk_bch_t* argv[])
hawk_setopt (hawk, HAWK_OPT_INCLUDEDIRS, arg.includedirs); hawk_setopt (hawk, HAWK_OPT_INCLUDEDIRS, arg.includedirs);
#endif #endif
} }
#endif
if (arg.modlibdirs) if (arg.modlibdirs)
{ {

View File

@ -24,7 +24,9 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#if defined(__GNUC__) #if defined(__GNUC__) && (__GNUC__ >= 4)
# pragma pack(push,1)
#elif defined(__GNUC__)
# pragma pack(1) # pragma pack(1)
#elif defined(__HP_aCC) || defined(__HP_cc) #elif defined(__HP_aCC) || defined(__HP_cc)
# pragma PACK 1 # pragma PACK 1

View File

@ -24,7 +24,9 @@
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#if defined(__GNUC__) #if defined(__GNUC__) && (__GNUC__ >= 4)
# pragma pack(pop)
#elif defined(__GNUC__)
# pragma pack() # pragma pack()
#elif defined(__HP_aCC) || defined(__HP_cc) #elif defined(__HP_aCC) || defined(__HP_cc)
# pragma PACK # pragma PACK

View File

@ -864,7 +864,7 @@ static int begin_include (hawk_t* hawk, int once)
hawk->parse.pragma.trait = (hawk->opt.trait & (HAWK_IMPLICIT | HAWK_MULTILINESTR | HAWK_STRIPRECSPC | HAWK_STRIPSTRSPC)); hawk->parse.pragma.trait = (hawk->opt.trait & (HAWK_IMPLICIT | HAWK_MULTILINESTR | HAWK_STRIPRECSPC | HAWK_STRIPSTRSPC));
*/ */
/* i update the current pointer after opening is successful */ /* update the current pointer after opening is successful */
hawk->sio.inp = arg; hawk->sio.inp = arg;
hawk->parse.depth.incl++; hawk->parse.depth.incl++;