* bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X
@ 2011-01-13 22:16 Peter Dyballa
[not found] ` <handler.7838.B.129495701012937.ack@debbugs.gnu.org>
2012-06-18 2:58 ` bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X Samuel Bronson
0 siblings, 2 replies; 5+ messages in thread
From: Peter Dyballa @ 2011-01-13 22:16 UTC (permalink / raw)
To: 7838
Hello!
From *compilation* buffer:
..../lib-src/emacsclient.c: In function ‘set_local_socket’:
..../lib-src/emacsclient.c:1235: warning: passing argument 2 of
‘confstr’ discards qualifiers from pointer target type
Multiple include guards may be useful for:
../src/s/darwin.h
From the source:
1222 if (default_sock)
1223 {
1224 tmpdir = egetenv ("TMPDIR");
1225 if (!tmpdir)
1226 {
1227 #ifdef DARWIN_OS
1228 #ifndef _CS_DARWIN_USER_TEMP_DIR
1229 #define _CS_DARWIN_USER_TEMP_DIR 65537
1230 #endif
1231 size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL,
(size_t) 0);
1232 if (n > 0)
1233 {
1234 tmpdir = alloca (n);
1235 confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
1236 }
1237 else
1238 #endif
1239 tmpdir = "/tmp";
1240 }
In GNU Emacs 24.0.50.1 (powerpc-apple-darwin9.8.0, X toolkit, Xaw3d
scroll bars)
of 2011-01-13 on localhost
Windowing system distributor `The X.Org Foundation', version
11.0.10903000
configured using `configure '--without-sound' '--without-dbus' '--
without-pop' '--without-gconf' '--with-x-toolkit=athena' '--x-
libraries=/usr/X11/lib' '--x-includes=/usr/X11/include' '--enable-
locallisppath=/Library/Application Support/Emacs/calendar24:/Library/
Application Support/Emacs' 'CFLAGS=-g -H -pipe -fPIC -fno-common -
mcpu=7450 -mtune=7450 -faltivec -fast' 'CPPFLAGS=-I/usr/local/include -
idirafter /opt/local/include' 'LDFLAGS=-L/usr/local/lib -Wl,-
dead_strip_dylibs' 'CC=gcc-4.2' 'CPP=cpp-4.2' 'PKG_CONFIG_PATH=/usr/
local/lib/pkgconfig:/usr/local/share/pkgconfig:/opt/local/lib/
pkgconfig:/opt/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/X11/lib/
pkgconfig:/usr/X11/share/pkgconfig''
--
Greetings
Pete
Never be led astray onto the path of virtue
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7838: Acknowledgement (24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X)
[not found] ` <handler.7838.B.129495701012937.ack@debbugs.gnu.org>
@ 2011-03-31 17:26 ` Peter Dyballa
0 siblings, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2011-03-31 17:26 UTC (permalink / raw)
To: 7838
Hello!
GCC 4.5.2 now reports:
.../emacs-24.0.50/lib-src/emacsclient.c: In Funktion »set_local_socket«:
.../emacs-24.0.50/lib-src/emacsclient.c:1251:17: Warnung: Übergabe des
Arguments 2 von »confstr« entfernt Kennzeichner von Zeiger-Ziel-Typ
/usr/include/unistd.h:423:9: Anmerkung: expected »char *« but argument
is of type »const char *«
1238 if (default_sock)
1239 {
1240 tmpdir = egetenv ("TMPDIR");
1241 if (!tmpdir)
1242 {
1243 #ifdef DARWIN_OS
1244 #ifndef _CS_DARWIN_USER_TEMP_DIR
1245 #define _CS_DARWIN_USER_TEMP_DIR 65537
1246 #endif
1247 size_t n = confstr (_CS_DARWIN_USER_TEMP_DIR, NULL,
(size_t) 0);
1248 if (n > 0)
1249 {
1250 tmpdir = alloca (n);
1251 confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
1252 }
1253 else
1254 #endif
1255 tmpdir = "/tmp";
1256 }
And in /usr/include/unistd.h:
414 __BEGIN_DECLS
415
416 void _exit(int) __dead2;
417 int access(const char *, int);
418 unsigned int
419 alarm(unsigned int);
420 int chdir(const char *);
421 int chown(const char *, uid_t, gid_t);
422 int close(int) __DARWIN_ALIAS_C(close);
423 size_t confstr(int, char *, size_t) __DARWIN_ALIAS(confstr);
424 char *crypt(const char *, const char *);
425 char *ctermid(char *);
--
Greetings
Pete
Without vi there is only GNU Emacs
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X
2011-01-13 22:16 bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X Peter Dyballa
[not found] ` <handler.7838.B.129495701012937.ack@debbugs.gnu.org>
@ 2012-06-18 2:58 ` Samuel Bronson
2012-06-22 20:58 ` Peter Dyballa
2012-06-24 9:43 ` Chong Yidong
1 sibling, 2 replies; 5+ messages in thread
From: Samuel Bronson @ 2012-06-18 2:58 UTC (permalink / raw)
To: Peter_Dyballa; +Cc: 7838
The fix is simple:
=== modified file 'lib-src/emacsclient.c'
--- lib-src/emacsclient.c 2012-05-05 04:32:58 +0000
+++ lib-src/emacsclient.c 2012-06-17 18:00:58 +0000
@@ -1278,7 +1278,7 @@
if (n > 0)
{
tmpdir = tmpdir_storage = xmalloc (n);
- confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
+ confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir_storage, n);
}
else
#endif
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X
2012-06-18 2:58 ` bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X Samuel Bronson
@ 2012-06-22 20:58 ` Peter Dyballa
2012-06-24 9:43 ` Chong Yidong
1 sibling, 0 replies; 5+ messages in thread
From: Peter Dyballa @ 2012-06-22 20:58 UTC (permalink / raw)
To: Samuel Bronson; +Cc: 7838
Am 18.06.2012 um 04:58 schrieb Samuel Bronson:
> The fix is simple:
>
> === modified file 'lib-src/emacsclient.c'
> --- lib-src/emacsclient.c 2012-05-05 04:32:58 +0000
> +++ lib-src/emacsclient.c 2012-06-17 18:00:58 +0000
> @@ -1278,7 +1278,7 @@
> if (n > 0)
> {
> tmpdir = tmpdir_storage = xmalloc (n);
> - confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
> + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir_storage, n);
> }
> else
> #endif
It indeed works!
--
Greetings
Pete
Atheism is a non prophet organisation.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X
2012-06-18 2:58 ` bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X Samuel Bronson
2012-06-22 20:58 ` Peter Dyballa
@ 2012-06-24 9:43 ` Chong Yidong
1 sibling, 0 replies; 5+ messages in thread
From: Chong Yidong @ 2012-06-24 9:43 UTC (permalink / raw)
To: Samuel Bronson; +Cc: Peter_Dyballa, 7838
Samuel Bronson <naesten@gmail.com> writes:
> The fix is simple:
>
> === modified file 'lib-src/emacsclient.c'
> --- lib-src/emacsclient.c 2012-05-05 04:32:58 +0000
> +++ lib-src/emacsclient.c 2012-06-17 18:00:58 +0000
> @@ -1278,7 +1278,7 @@
> if (n > 0)
> {
> tmpdir = tmpdir_storage = xmalloc (n);
> - confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir, n);
> + confstr (_CS_DARWIN_USER_TEMP_DIR, tmpdir_storage, n);
> }
> else
> #endif
Thanks, committed.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-06-24 9:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 22:16 bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X Peter Dyballa
[not found] ` <handler.7838.B.129495701012937.ack@debbugs.gnu.org>
2011-03-31 17:26 ` bug#7838: Acknowledgement (24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X) Peter Dyballa
2012-06-18 2:58 ` bug#7838: 24.0.50; warning in lib-src/emacsclient.c:1235 in Mac OS X Samuel Bronson
2012-06-22 20:58 ` Peter Dyballa
2012-06-24 9:43 ` Chong Yidong
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.