Skip to content

Commit 76e2ec4

Browse files
committed
1 parent 5c5e05b commit 76e2ec4

File tree

16 files changed

+1231
-1202
lines changed

16 files changed

+1231
-1202
lines changed

Makefile.am

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,27 @@
11
#*************************************************************************
22
#
3-
# OpenOffice.org - a multi-platform office productivity suite
3+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
#
5+
# Copyright 2000, 2010 Oracle and/or its affiliates.
46
#
5-
# $RCSfile: Makefile.am,v $
7+
# OpenOffice.org - a multi-platform office productivity suite
68
#
7-
# $Revision: 1.12 $
9+
# This file is part of OpenOffice.org.
810
#
9-
# last change: $Author: kz $ $Date: 2008-03-05 18:26:19 $
11+
# OpenOffice.org is free software: you can redistribute it and/or modify
12+
# it under the terms of the GNU Lesser General Public License version 3
13+
# only, as published by the Free Software Foundation.
1014
#
11-
# The Contents of this file are made available subject to
12-
# the terms of GNU Lesser General Public License Version 2.1.
15+
# OpenOffice.org is distributed in the hope that it will be useful,
16+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
# GNU Lesser General Public License version 3 for more details
19+
# (a copy is included in the LICENSE file that accompanied this code).
1320
#
14-
#
15-
# GNU Lesser General Public License Version 2.1
16-
# =============================================
17-
# Copyright 2005 by Sun Microsystems, Inc.
18-
# 901 San Antonio Road, Palo Alto, CA 94303, USA
19-
#
20-
# This library is free software; you can redistribute it and/or
21-
# modify it under the terms of the GNU Lesser General Public
22-
# License version 2.1, as published by the Free Software Foundation.
23-
#
24-
# This library is distributed in the hope that it will be useful,
25-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
26-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27-
# Lesser General Public License for more details.
28-
#
29-
# You should have received a copy of the GNU Lesser General Public
30-
# License along with this library; if not, write to the Free Software
31-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32-
# MA 02111-1307 USA
21+
# You should have received a copy of the GNU Lesser General Public License
22+
# version 3 along with OpenOffice.org. If not, see
23+
# <http://www.openoffice.org/license.html>
24+
# for a copy of the LGPLv3 License.
3325
#
3426
#*************************************************************************
3527

Makefile.in

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,36 +16,28 @@
1616

1717
#*************************************************************************
1818
#
19-
# OpenOffice.org - a multi-platform office productivity suite
19+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
20+
#
21+
# Copyright 2000, 2010 Oracle and/or its affiliates.
2022
#
21-
# $RCSfile: Makefile.in,v $
23+
# OpenOffice.org - a multi-platform office productivity suite
2224
#
23-
# $Revision: 1.15 $
25+
# This file is part of OpenOffice.org.
2426
#
25-
# last change: $Author: kz $ $Date: 2008-03-05 18:26:33 $
27+
# OpenOffice.org is free software: you can redistribute it and/or modify
28+
# it under the terms of the GNU Lesser General Public License version 3
29+
# only, as published by the Free Software Foundation.
2630
#
27-
# The Contents of this file are made available subject to
28-
# the terms of GNU Lesser General Public License Version 2.1.
31+
# OpenOffice.org is distributed in the hope that it will be useful,
32+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
33+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34+
# GNU Lesser General Public License version 3 for more details
35+
# (a copy is included in the LICENSE file that accompanied this code).
2936
#
30-
#
31-
# GNU Lesser General Public License Version 2.1
32-
# =============================================
33-
# Copyright 2005 by Sun Microsystems, Inc.
34-
# 901 San Antonio Road, Palo Alto, CA 94303, USA
35-
#
36-
# This library is free software; you can redistribute it and/or
37-
# modify it under the terms of the GNU Lesser General Public
38-
# License version 2.1, as published by the Free Software Foundation.
39-
#
40-
# This library is distributed in the hope that it will be useful,
41-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
42-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
43-
# Lesser General Public License for more details.
44-
#
45-
# You should have received a copy of the GNU Lesser General Public
46-
# License along with this library; if not, write to the Free Software
47-
# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
48-
# MA 02111-1307 USA
37+
# You should have received a copy of the GNU Lesser General Public License
38+
# version 3 along with OpenOffice.org. If not, see
39+
# <http://www.openoffice.org/license.html>
40+
# for a copy of the LGPLv3 License.
4941
#
5042
#*************************************************************************
5143

config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
5656
#undef HAVE_NDIR_H
5757

58+
/* Define to 1 if you have the `setenv' function. */
59+
#undef HAVE_SETENV
60+
5861
/* Define to 1 if you have the `settz' function. */
5962
#undef HAVE_SETTZ
6063

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7437,7 +7437,7 @@ done
74377437
74387438
74397439
7440-
for ac_func in getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday
7440+
for ac_func in getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday setenv
74417441
do
74427442
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
74437443
{ echo "$as_me:$LINENO: checking for $ac_func" >&5

configure.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ AC_FUNC_MEMCMP
211211
AC_TYPE_SIGNAL
212212
AC_FUNC_UTIME_NULL
213213
AC_FUNC_VPRINTF
214-
AC_CHECK_FUNCS(getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday)
214+
AC_CHECK_FUNCS(getcwd getwd strerror setvbuf tzset settz mkstemp tempnam gettimeofday setenv)
215215
# Usefull, but special to newlib/MSVC
216216
AC_CHECK_FUNCS(strlwr)
217217

dag.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,14 +369,17 @@ int flags; /* initial ht_flags */
369369
/* strip out any \<nl> combinations where \ is the current
370370
* CONTINUATION char */
371371
for(p=q; (p=strchr(p,CONTINUATION_CHAR))!=NIL(char); )
372-
if( p[1] == '\n' )
373-
strcpy( p, p+2 );
372+
if( p[1] == '\n' ) {
373+
size_t len = strlen(p+2)+1;
374+
memmove ( p, p+2, len );
375+
}
374376
else
375377
p++;
376378

377379
p = DmStrSpn(q ," \t"); /* Strip white space before ... */
378380
if( p != q ) {
379-
strcpy( q, p);
381+
size_t len = strlen(p)+1;
382+
memmove( q, p, len );
380383
p = q;
381384
}
382385

dmake.c

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -380,16 +380,19 @@ char **argv;
380380
_warn = TRUE;
381381

382382
/* If -r was not given find and parse startup-makefile. */
383-
if( Rules ) {
384-
char *fname;
385-
386-
/* Search_file() also checks the environment variable. */
387-
if( (mkfil=Search_file("MAKESTARTUP", &fname)) != NIL(FILE) ) {
388-
Parse(mkfil);
389-
Def_macro( "MAKESTARTUP", fname, M_EXPANDED|M_MULTI|M_FORCE );
390-
}
391-
else
392-
Fatal( "Configuration file `%s' not found", fname );
383+
if( Rules )
384+
{
385+
char *fname = NIL(char);
386+
387+
/* Search_file() also checks the environment variable. */
388+
if( (mkfil=Search_file("MAKESTARTUP", &fname)) != NIL(FILE) )
389+
{
390+
Parse(mkfil);
391+
Def_macro( "MAKESTARTUP", fname, M_EXPANDED|M_MULTI|M_FORCE );
392+
}
393+
else
394+
Fatal( "Configuration file `%s' not found", fname );
395+
if ( fname != NIL(char)) { FREE( fname ); fname = NIL(char); }
393396
}
394397

395398
/* Define the targets set on the command line now. */
@@ -428,8 +431,7 @@ char **argv;
428431
char *p;
429432

430433
if( strcmp(f, "stdin") == 0 ) f = "-";
431-
p = DmStrAdd( "-f", f, FALSE );
432-
Def_macro( "MAKEFILE", p, M_PRECIOUS|M_NOEXPORT );
434+
Def_macro( "MAKEFILE", p = DmStrAdd( "-f", f, FALSE ), M_PRECIOUS|M_NOEXPORT ); FREE(p);
433435
Parse( mkfil );
434436
}
435437
else if( !Rules )
@@ -663,23 +665,25 @@ char **rname;
663665
*/
664666

665667
if( (hp = GET_MACRO(macname)) != NIL(HASH) ) {
666-
/* Only expand if needed. */
667-
if( hp->ht_flag & M_EXPANDED ) {
668-
ename = fname = DmStrDup(hp->ht_value);
669-
} else {
670-
ename = fname = Expand(hp->ht_value);
671-
}
672-
673-
if( hp->ht_flag & M_PRECIOUS ) fil = Openfile(fname, FALSE, FALSE);
668+
/* Only expand if needed. */
669+
if( hp->ht_flag & M_EXPANDED ) {
670+
ename = fname = DmStrDup(hp->ht_value);
671+
} else {
672+
ename = fname = Expand(hp->ht_value);
673+
}
674+
675+
if( hp->ht_flag & M_PRECIOUS ) fil = Openfile(fname, FALSE, FALSE);
674676
}
675677

676678
if( fil == NIL(FILE) ) {
677-
fname=Expand(Read_env_string(macname));
678-
if( (fil = Openfile(fname, FALSE, FALSE)) != NIL(FILE) ) FREE(ename);
679+
fname=Expand(Read_env_string(macname));
680+
if( (fil = Openfile(fname, FALSE, FALSE)) != NIL(FILE) ) FREE(ename);
679681
}
680682

681-
if( fil == NIL(FILE) && hp != NIL(HASH) )
682-
fil = Openfile(fname=ename, FALSE, FALSE);
683+
if( fil == NIL(FILE) && hp != NIL(HASH) ) {
684+
if ( fname != NIL(char) ) { FREE(fname); fname = NIL(char); }
685+
fil = Openfile(fname=ename, FALSE, FALSE);
686+
}
683687

684688
if( rname ) *rname = fname;
685689

0 commit comments

Comments
 (0)